#![feature(type_alias_impl_trait)] mod test_type_param_static { type Ty = impl Sized + 'static; //~^ ERROR: the parameter type `A` may not live long enough fn defining(s: A) -> Ty { s } fn assert_static() {} fn test() where Ty: 'static { assert_static::() } } fn main() {}