rust/tests/ui/regions/regions-creating-enums4.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
543 B
Plaintext
Raw Normal View History

error: lifetime may not live long enough
2022-04-02 01:13:25 +08:00
--> $DIR/regions-creating-enums4.rs:7:5
|
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)
| ^^^^^^^^^^^^^^ 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`
error: aborting due to 1 previous error