mirror of https://github.com/rust-lang/rust
60 lines
2.4 KiB
Plaintext
60 lines
2.4 KiB
Plaintext
error[E0277]: the trait bound `for<'a> T: Trait<'a>` is not satisfied
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:28:19
|
|
|
|
|
LL | trait_bound::<T>();
|
|
| ^ the trait `for<'a> Trait<'a>` is not implemented for `T`
|
|
|
|
|
note: required by a bound in `trait_bound`
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:17:19
|
|
|
|
|
LL | fn trait_bound<T: for<'a> Trait<'a>>() {}
|
|
| ^^^^^^^^^^^^^^^^^ required by this bound in `trait_bound`
|
|
|
|
error[E0277]: the trait bound `for<'a> T: Trait<'a>` is not satisfied
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:38:24
|
|
|
|
|
LL | projection_bound::<T>();
|
|
| ^ the trait `for<'a> Trait<'a>` is not implemented for `T`
|
|
|
|
|
note: required by a bound in `projection_bound`
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:18:24
|
|
|
|
|
LL | fn projection_bound<T: for<'a> Trait<'a, Assoc = usize>>() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `projection_bound`
|
|
|
|
error[E0271]: type mismatch resolving `<T as Trait<'a>>::Assoc == usize`
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:38:24
|
|
|
|
|
LL | projection_bound::<T>();
|
|
| ^ type mismatch resolving `<T as Trait<'a>>::Assoc == usize`
|
|
|
|
|
note: types differ
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:14:18
|
|
|
|
|
LL | type Assoc = usize;
|
|
| ^^^^^
|
|
note: required by a bound in `projection_bound`
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:18:42
|
|
|
|
|
LL | fn projection_bound<T: for<'a> Trait<'a, Assoc = usize>>() {}
|
|
| ^^^^^^^^^^^^^ required by this bound in `projection_bound`
|
|
|
|
error: higher-ranked subtype error
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:53:30
|
|
|
|
|
LL | let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: higher-ranked subtype error
|
|
--> $DIR/candidate-from-env-universe-err-project.rs:53:30
|
|
|
|
|
LL | let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
Some errors have detailed explanations: E0271, E0277.
|
|
For more information about an error, try `rustc --explain E0271`.
|