rust/tests/ui/associated-types/associated-types-project-fr...

55 lines
1.8 KiB
Plaintext

error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
--> $DIR/associated-types-project-from-hrtb-in-struct.rs:11:12
|
LL | field: I::A
| ^^^^
|
help: use a fully qualified path with explicit lifetimes
|
LL ~ struct SomeStruct<'a, I: for<'x> Foo<&'x isize>> {
LL ~ field: <I as Foo<&'a isize>>::A
|
error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
--> $DIR/associated-types-project-from-hrtb-in-struct.rs:16:18
|
LL | TupleVariant(I::A),
| ^^^^
|
help: use a fully qualified path with explicit lifetimes
|
LL ~ enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> {
LL ~ TupleVariant(<I as Foo<&'c isize>>::A),
|
error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
--> $DIR/associated-types-project-from-hrtb-in-struct.rs:18:28
|
LL | StructVariant { field: I::A },
| ^^^^
|
help: use a fully qualified path with explicit lifetimes
|
LL ~ enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> {
LL | TupleVariant(I::A),
LL |
LL ~ StructVariant { field: <I as Foo<&'c isize>>::A },
|
error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
--> $DIR/associated-types-project-from-hrtb-in-struct.rs:35:12
|
LL | field: I::A,
| ^^^^
|
help: use a fully qualified path with explicit lifetimes
|
LL ~ struct Why<'bb, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x,
LL | 'y, 'z, 'aa, I: for<'l, 'm> Foo<&'l &'m isize>> {
LL ~ field: <I as Foo<&'bb &'bb isize>>::A,
|
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0212`.