]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr
Change compare mode to use -Zborrowck=mir
[rust.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 error: lifetime may not live long enough
13   --> $DIR/variance-use-invariant-struct-1.rs:19:5
14    |
15 LL | fn bar<'min,'max>(v: SomeStruct<&'min ()>)
16    |        ---- ---- lifetime `'max` defined here
17    |        |
18    |        lifetime `'min` defined here
19 ...
20 LL |     v
21    |     ^ returning this value requires that `'min` must outlive `'max`
22
23 error: aborting due to 2 previous errors
24