fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
752 B22 linesraw
1error[E0308]: mismatched types
2  --> $DIR/variance-use-covariant-struct-1.rs:10:5
3   |
4LL |     v
5   |     ^ lifetime mismatch
6   |
7   = note: expected struct `SomeStruct<&'max ()>`
8              found struct `SomeStruct<&'min ()>`
9note: the lifetime `'min` as defined on the function body at 6:8...
10  --> $DIR/variance-use-covariant-struct-1.rs:6:8
11   |
12LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
13   |        ^^^^
14note: ...does not necessarily outlive the lifetime `'max` as defined on the function body at 6:13
15  --> $DIR/variance-use-covariant-struct-1.rs:6:13
16   |
17LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
18   |             ^^^^
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0308`.