1 error[E0308]: mismatched types
2 --> $DIR/variance-covariant-self-trait-match.rs:14:5
4 LL | impls_get::<&'min G>();
5 | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
7 = note: expected type `<&'min G as Get>`
8 found type `<&'max G as Get>`
9 note: the lifetime `'min` as defined on the function body at 10:21...
10 --> $DIR/variance-covariant-self-trait-match.rs:10:21
12 LL | fn get_min_from_max<'min, 'max, G>()
14 note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 10:27
15 --> $DIR/variance-covariant-self-trait-match.rs:10:27
17 LL | fn get_min_from_max<'min, 'max, G>()
20 error[E0308]: mismatched types
21 --> $DIR/variance-covariant-self-trait-match.rs:20:5
23 LL | impls_get::<&'max G>();
24 | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
26 = note: expected type `<&'max G as Get>`
27 found type `<&'min G as Get>`
28 note: the lifetime `'min` as defined on the function body at 17:21...
29 --> $DIR/variance-covariant-self-trait-match.rs:17:21
31 LL | fn get_max_from_min<'min, 'max, G>()
33 note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 17:27
34 --> $DIR/variance-covariant-self-trait-match.rs:17:27
36 LL | fn get_max_from_min<'min, 'max, G>()
39 error: aborting due to 2 previous errors
41 For more information about this error, try `rustc --explain E0308`.