#![feature(type_alias_impl_trait)] fn main() { let y = 42; let x = wrong_generic(&y); let z: i32 = x; //~^ ERROR non-defining opaque type use } type WrongGeneric = impl 'static; //~^ ERROR: at least one trait must be specified fn wrong_generic(t: T) -> WrongGeneric { t //~^ ERROR the parameter type `T` may not live long enough }