2019-01-27 19:03:21 +08:00
|
|
|
error: lifetime may not live long enough
|
2022-04-02 01:13:25 +08:00
|
|
|
--> $DIR/regions-creating-enums4.rs:7:5
|
2019-01-27 19:03:21 +08:00
|
|
|
|
|
|
|
|
LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
LL | Ast::Add(x, y)
|
2022-01-01 05:55:34 +08:00
|
|
|
| ^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
2019-10-27 22:39:14 +08:00
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'a: 'b`
|
2019-01-27 19:03:21 +08:00
|
|
|
|
2023-11-21 23:44:16 +08:00
|
|
|
error: aborting due to 1 previous error
|
2019-01-27 19:03:21 +08:00
|
|
|
|