blob: 3a97875fe0ec07433301a0256c40e69bc8bf0d31 (
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-covariant-arg-object.rs:19:5
|
LL | v
| ^ lifetime mismatch
|
= note: expected trait object `dyn Get<&'min i32>`
found trait object `dyn Get<&'max i32>`
note: the lifetime `'min` as defined here...
--> $DIR/variance-covariant-arg-object.rs:14:21
|
LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
| ^^^^
note: ...does not necessarily outlive the lifetime `'max` as defined here
--> $DIR/variance-covariant-arg-object.rs:14:27
|
LL | fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
| ^^^^
error[E0308]: mismatched types
--> $DIR/variance-covariant-arg-object.rs:28:5
|
LL | v
| ^ lifetime mismatch
|
= note: expected trait object `dyn Get<&'max i32>`
found trait object `dyn Get<&'min i32>`
note: the lifetime `'min` as defined here...
--> $DIR/variance-covariant-arg-object.rs:24:21
|
LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
| ^^^^
note: ...does not necessarily outlive the lifetime `'max` as defined here
--> $DIR/variance-covariant-arg-object.rs:24:27
|
LL | fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
| ^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.
|