]> git.proxmox.com Git - rustc.git/blob - src/test/ui/variance/variance-use-contravariant-struct-1.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / variance / variance-use-contravariant-struct-1.stderr
1 error[E0308]: mismatched types
2 --> $DIR/variance-use-contravariant-struct-1.rs:12:5
3 |
4 LL | v
5 | ^ lifetime mismatch
6 |
7 = note: expected struct `SomeStruct<&'min ()>`
8 found struct `SomeStruct<&'max ()>`
9 note: the lifetime `'min` as defined here...
10 --> $DIR/variance-use-contravariant-struct-1.rs:8:8
11 |
12 LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
13 | ^^^^
14 note: ...does not necessarily outlive the lifetime `'max` as defined here
15 --> $DIR/variance-use-contravariant-struct-1.rs:8:13
16 |
17 LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
18 | ^^^^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0308`.