3 // Test that even when `T` is only used in contravariant position, it
4 // is treated as invariant.
10 fn get_min_from_max<'min, 'max, G>()
11 where 'max : 'min, G : Get<&'max i32>
13 impls_get::<G,&'min i32>()
14 //~^ ERROR lifetime may not live long enough
17 fn get_max_from_min<'min, 'max, G>()
18 where 'max : 'min, G : Get<&'min i32>
20 // Previously OK, but now an error because traits are invariant:
22 impls_get::<G,&'max i32>()
23 //~^ ERROR lifetime may not live long enough
26 fn impls_get<G,T>() where G : Get<T> { }