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