3 // Test that even when `Self` is only used in covariant position, it
4 // is treated as invariant.
10 fn get_min_from_max<'min, 'max, G>()
11 where 'max : 'min, G : 'max, &'max G : Get
13 // Previously OK, now an error as traits are invariant.
14 impls_get::<&'min G>();
15 //~^ ERROR lifetime may not live long enough
18 fn get_max_from_min<'min, 'max, G>()
19 where 'max : 'min, G : 'max, &'min G : Get
21 impls_get::<&'max G>();
22 //~^ ERROR lifetime may not live long enough
25 fn impls_get<G>() where G : Get { }