1 #![feature(type_alias_impl_trait)]
4 // ignore-compare-mode-nll
5 //[nll] compile-flags: -Z borrowck=mir
9 let x = wrong_generic(&y);
11 //~^ ERROR non-defining opaque type use
14 type WrongGeneric<T> = impl 'static;
15 //~^ ERROR: at least one trait must be specified
17 fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
19 //~^ ERROR the parameter type `T` may not live long enough