]> git.proxmox.com Git - rustc.git/blob - src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / variance / variance-use-invariant-struct-1.nll.stderr
1 error: lifetime may not live long enough
2 --> $DIR/variance-use-invariant-struct-1.rs:12:5
3 |
4 LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
5 | ---- ---- lifetime `'max` defined here
6 | |
7 | lifetime `'min` defined here
8 ...
9 LL | v
10 | ^ returning this value requires that `'min` must outlive `'max`
11 |
12 = help: consider adding the following bound: `'min: 'max`
13
14 error: lifetime may not live long enough
15 --> $DIR/variance-use-invariant-struct-1.rs:19:5
16 |
17 LL | fn bar<'min,'max>(v: SomeStruct<&'min ()>)
18 | ---- ---- lifetime `'max` defined here
19 | |
20 | lifetime `'min` defined here
21 ...
22 LL | v
23 | ^ returning this value requires that `'min` must outlive `'max`
24 |
25 = help: consider adding the following bound: `'min: 'max`
26
27 error: aborting due to 2 previous errors
28