fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
717 B22 linesraw
1error: lifetime may not live long enough
2  --> $DIR/regions-bounds.rs:9:12
3   |
4LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> {
5   |          -- -- lifetime `'b` defined here
6   |          |
7   |          lifetime `'a` defined here
8LL |     return e;
9   |            ^ returning this value requires that `'a` must outlive `'b`
10
11error: lifetime may not live long enough
12  --> $DIR/regions-bounds.rs:13:12
13   |
14LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
15   |          -- -- lifetime `'b` defined here
16   |          |
17   |          lifetime `'a` defined here
18LL |     return e;
19   |            ^ returning this value requires that `'a` must outlive `'b`
20
21error: aborting due to 2 previous errors
22