3 // Test that even when `Self` 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 : 'max, &'max G : Get
13 impls_get::<&'min G>(); //~ ERROR mismatched types
16 fn get_max_from_min<'min, 'max, G>()
17 where 'max : 'min, G : 'max, &'min G : Get
19 // Previously OK, but now error because traits are invariant with
20 // respect to all inputs.
22 impls_get::<&'max G>(); //~ ERROR mismatched types
25 fn impls_get<G>() where G : Get { }