blob: 370e57f73df10ae05e6d1e224b333e8f522ed49c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
error[E0308]: mismatched types
--> $DIR/variance-contravariant-arg-trait-match.rs:13:5
|
LL | impls_get::<G,&'min i32>()
| ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected type `Get<&'min i32>`
found type `Get<&'max i32>`
note: the lifetime `'min` as defined here...
--> $DIR/variance-contravariant-arg-trait-match.rs:10:21
|
LL | fn get_min_from_max<'min, 'max, G>()
| ^^^^
note: ...does not necessarily outlive the lifetime `'max` as defined here
--> $DIR/variance-contravariant-arg-trait-match.rs:10:27
|
LL | fn get_min_from_max<'min, 'max, G>()
| ^^^^
error[E0308]: mismatched types
--> $DIR/variance-contravariant-arg-trait-match.rs:21:5
|
LL | impls_get::<G,&'max i32>()
| ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected type `Get<&'max i32>`
found type `Get<&'min i32>`
note: the lifetime `'min` as defined here...
--> $DIR/variance-contravariant-arg-trait-match.rs:16:21
|
LL | fn get_max_from_min<'min, 'max, G>()
| ^^^^
note: ...does not necessarily outlive the lifetime `'max` as defined here
--> $DIR/variance-contravariant-arg-trait-match.rs:16:27
|
LL | fn get_max_from_min<'min, 'max, G>()
| ^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.
|