Don't try and handle unfed type_of on anon consts
This commit is contained in:
parent
c44b3d50fe
commit
ec036cda3f
6 changed files with 14 additions and 270 deletions
|
|
@ -3,8 +3,6 @@
|
|||
trait X {
|
||||
fn test() -> Self::Assoc<{ async {} }>;
|
||||
//~^ ERROR associated type `Assoc` not found for `Self`
|
||||
//~| ERROR associated type `Assoc` not found for `Self`
|
||||
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,6 @@ error[E0220]: associated type `Assoc` not found for `Self`
|
|||
LL | fn test() -> Self::Assoc<{ async {} }>;
|
||||
| ^^^^^ associated type `Assoc` not found
|
||||
|
||||
error[E0220]: associated type `Assoc` not found for `Self`
|
||||
--> $DIR/coroutine-in-orphaned-anon-const.rs:4:24
|
||||
|
|
||||
LL | fn test() -> Self::Assoc<{ async {} }>;
|
||||
| ^^^^^ associated type `Assoc` not found
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0220`.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
trait X {
|
||||
fn a<T>() -> T::unknown<{}> {}
|
||||
//~^ ERROR: associated type `unknown` not found for `T`
|
||||
//~| ERROR: associated type `unknown` not found for `T`
|
||||
}
|
||||
|
||||
trait Y {
|
||||
|
|
@ -14,7 +13,6 @@ trait Y {
|
|||
trait Z<T> {
|
||||
fn a() -> T::unknown<{}> {}
|
||||
//~^ ERROR: associated type `unknown` not found for `T`
|
||||
//~| ERROR: associated type `unknown` not found for `T`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -5,34 +5,18 @@ LL | fn a<T>() -> T::unknown<{}> {}
|
|||
| ^^^^^^^ associated type `unknown` not found
|
||||
|
||||
error[E0220]: associated type `unknown` not found for `T`
|
||||
--> $DIR/unknown-assoc-with-const-arg.rs:15:18
|
||||
--> $DIR/unknown-assoc-with-const-arg.rs:14:18
|
||||
|
|
||||
LL | fn a() -> T::unknown<{}> {}
|
||||
| ^^^^^^^ associated type `unknown` not found
|
||||
|
||||
error[E0220]: associated type `unknown` not found for `T`
|
||||
--> $DIR/unknown-assoc-with-const-arg.rs:4:21
|
||||
|
|
||||
LL | fn a<T>() -> T::unknown<{}> {}
|
||||
| ^^^^^^^ associated type `unknown` not found
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0220]: associated type `unknown` not found for `T`
|
||||
--> $DIR/unknown-assoc-with-const-arg.rs:15:18
|
||||
|
|
||||
LL | fn a() -> T::unknown<{}> {}
|
||||
| ^^^^^^^ associated type `unknown` not found
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared type `NOT_EXIST`
|
||||
--> $DIR/unknown-assoc-with-const-arg.rs:10:15
|
||||
--> $DIR/unknown-assoc-with-const-arg.rs:9:15
|
||||
|
|
||||
LL | fn a() -> NOT_EXIST::unknown<{}> {}
|
||||
| ^^^^^^^^^ use of undeclared type `NOT_EXIST`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0220, E0433.
|
||||
For more information about an error, try `rustc --explain E0220`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue