fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
925 B26 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   |            ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
10   |
11   = help: consider adding the following bound: `'a: 'b`
12
13error: lifetime may not live long enough
14  --> $DIR/regions-bounds.rs:14:12
15   |
16LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
17   |          -- -- lifetime `'b` defined here
18   |          |
19   |          lifetime `'a` defined here
20LL |     return e;
21   |            ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
22   |
23   = help: consider adding the following bound: `'a: 'b`
24
25error: aborting due to 2 previous errors
26