summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check4_static.rs
blob: ac32dbde04b1c8e3fe8d05b032912a3a943c395b (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(type_alias_impl_trait)]

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

fn main() {}