1 #![feature(type_alias_impl_trait)]
5 type Underconstrained<T: std::fmt::Debug> = impl 'static;
6 //~^ ERROR: at least one trait must be specified
8 // not a defining use, because it doesn't define *all* possible generics
9 fn underconstrained<U>(_: U) -> Underconstrained<U> {
10 //~^ ERROR `U` doesn't implement `Debug`
14 type Underconstrained2<T: std::fmt::Debug> = impl 'static;
15 //~^ ERROR: at least one trait must be specified
17 // not a defining use, because it doesn't define *all* possible generics
18 fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
19 //~^ ERROR `V` doesn't implement `Debug`