]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_underconstrained.full_tait.stderr
1 error: at least one trait must be specified
2   --> $DIR/generic_underconstrained.rs:9:35
3    |
4 LL | type Underconstrained<T: Trait> = impl 'static;
5    |                                   ^^^^^^^^^^^^
6
7 warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
8   --> $DIR/generic_underconstrained.rs:3:32
9    |
10 LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
11    |                                ^^^^^^^^^^^^^^^^^^^^^
12    |
13    = note: `#[warn(incomplete_features)]` on by default
14    = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
15
16 error[E0277]: the trait bound `T: Trait` is not satisfied
17   --> $DIR/generic_underconstrained.rs:13:31
18    |
19 LL | type Underconstrained<T: Trait> = impl 'static;
20    |                          ----- required by this bound in `Underconstrained`
21 ...
22 LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
23    |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
24    |
25 help: consider restricting type parameter `T`
26    |
27 LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
28    |                    +++++++
29
30 error: aborting due to 2 previous errors; 1 warning emitted
31
32 For more information about this error, try `rustc --explain E0277`.