]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-use-covariant-struct-1.stderr
Rollup merge of #89507 - lopopolo:lopopolo/ordering-repr-i8, r=joshtriplett
[rust.git] / src / test / ui / variance / variance-use-covariant-struct-1.stderr
1 error[E0308]: mismatched types
2   --> $DIR/variance-use-covariant-struct-1.rs:10:5
3    |
4 LL |     v
5    |     ^ lifetime mismatch
6    |
7    = note: expected struct `SomeStruct<&'max ()>`
8               found struct `SomeStruct<&'min ()>`
9 note: the lifetime `'min` as defined here...
10   --> $DIR/variance-use-covariant-struct-1.rs:6:8
11    |
12 LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
13    |        ^^^^
14 note: ...does not necessarily outlive the lifetime `'max` as defined here
15   --> $DIR/variance-use-covariant-struct-1.rs:6:13
16    |
17 LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
18    |             ^^^^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0308`.