fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
722 B24 linesraw
1error: lifetime may not live long enough
2  --> $DIR/variance-use-invariant-struct-1.rs:12:5
3   |
4LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
5   |        ---- ---- lifetime `'max` defined here
6   |        |
7   |        lifetime `'min` defined here
8...
9LL |     v
10   |     ^ returning this value requires that `'min` must outlive `'max`
11
12error: lifetime may not live long enough
13  --> $DIR/variance-use-invariant-struct-1.rs:19:5
14   |
15LL | fn bar<'min,'max>(v: SomeStruct<&'min ()>)
16   |        ---- ---- lifetime `'max` defined here
17   |        |
18   |        lifetime `'min` defined here
19...
20LL |     v
21   |     ^ returning this value requires that `'min` must outlive `'max`
22
23error: aborting due to 2 previous errors
24