2019-01-27 11:03:21 +00:00
|
|
|
error: lifetime may not live long enough
|
2022-04-01 17:13:25 +00:00
|
|
|
--> $DIR/regions-bounds.rs:9:12
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
|
LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
LL | return e;
|
2021-12-31 21:55:34 +00:00
|
|
|
| ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
2019-10-27 14:39:14 +00:00
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'a: 'b`
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
error: lifetime may not live long enough
|
2022-04-01 17:13:25 +00:00
|
|
|
--> $DIR/regions-bounds.rs:14:12
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
|
LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
LL | return e;
|
2021-12-31 21:55:34 +00:00
|
|
|
| ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
2019-10-27 14:39:14 +00:00
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'a: 'b`
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|