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