]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_underconstrained.stderr
1 error: at least one trait must be specified
2   --> $DIR/generic_underconstrained.rs:6:35
3    |
4 LL | type Underconstrained<T: Trait> = impl 'static;
5    |                                   ^^^^^^^^^^^^
6
7 error[E0277]: the trait bound `T: Trait` is not satisfied
8   --> $DIR/generic_underconstrained.rs:10:31
9    |
10 LL | type Underconstrained<T: Trait> = impl 'static;
11    |                          ----- required by this bound in `Underconstrained`
12 ...
13 LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
14    |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
15    |
16 help: consider restricting type parameter `T`
17    |
18 LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
19    |                    +++++++
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0277`.