]> git.proxmox.com Git - rustc.git/blame - src/test/ui/variance/variance-use-invariant-struct-1.stderr
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / variance / variance-use-invariant-struct-1.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/variance-use-invariant-struct-1.rs:12:5
b7449926 3 |
532ac7d7 4LL | v
b7449926
XL
5 | ^ lifetime mismatch
6 |
7 = note: expected type `SomeStruct<&'min ()>`
8 found type `SomeStruct<&'max ()>`
e74abb32 9note: 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 |
12LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
13 | ^^^^
e74abb32 14note: ...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 |
17LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
18 | ^^^^
19
20error[E0308]: mismatched types
0731742a 21 --> $DIR/variance-use-invariant-struct-1.rs:19:5
b7449926 22 |
532ac7d7 23LL | v
b7449926
XL
24 | ^ lifetime mismatch
25 |
26 = note: expected type `SomeStruct<&'max ()>`
27 found type `SomeStruct<&'min ()>`
e74abb32 28note: 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 |
31LL | fn bar<'min,'max>(v: SomeStruct<&'min ()>)
32 | ^^^^
e74abb32 33note: ...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 |
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`.