]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_underconstrained.rs
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_underconstrained.rs
1 #![feature(type_alias_impl_trait)]
2
3 fn main() {}
4
5 trait Trait {}
6 type Underconstrained<T: Trait> = impl 'static;
7 //~^ ERROR: at least one trait must be specified
8
9 // no `Trait` bound
10 fn underconstrain<T>(_: T) -> Underconstrained<T> {
11     //~^ ERROR the trait bound `T: Trait`
12     unimplemented!()
13 }