2024-04-03 22:27:13 +01:00
|
|
|
error: implementation of `Trait` is not general enough
|
2024-04-03 22:48:48 +01:00
|
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:28:5
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
LL | trait_bound::<T>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ implementation of `Trait` is not general enough
|
|
|
|
|
|
|
|
|
= note: `T` must implement `Trait<'0>`, for any lifetime `'0`...
|
|
|
|
= note: ...but it actually implements `Trait<'static>`
|
|
|
|
|
|
|
|
error: implementation of `Trait` is not general enough
|
2024-04-03 22:48:48 +01:00
|
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:39:5
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
LL | projection_bound::<T>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Trait` is not general enough
|
|
|
|
|
|
|
|
|
= note: `T` must implement `Trait<'0>`, for any lifetime `'0`...
|
|
|
|
= note: ...but it actually implements `Trait<'static>`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-04-03 22:48:48 +01:00
|
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:39:5
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
LL | projection_bound::<T>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
|
|
|
|
|
|
|
|
= note: expected associated type `<T as Trait<'static>>::Assoc`
|
|
|
|
found associated type `<T as Trait<'a>>::Assoc`
|
|
|
|
note: the lifetime requirement is introduced here
|
2024-04-03 22:48:48 +01:00
|
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:18:42
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
LL | fn projection_bound<T: for<'a> Trait<'a, Assoc = usize>>() {}
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-04-03 22:48:48 +01:00
|
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:55:30
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
LL | let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
|
|
|
|
|
|
|
|
= note: expected associated type `<T as Trait<'static>>::Assoc`
|
|
|
|
found associated type `<T as Trait<'a>>::Assoc`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-04-03 22:48:48 +01:00
|
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:55:30
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
LL | let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
|
|
|
|
|
|
|
|
= note: expected associated type `<T as Trait<'static>>::Assoc`
|
|
|
|
found associated type `<T as Trait<'a>>::Assoc`
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|