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