rust/tests/ui/error-codes/E0621-does-not-trigger-for-closures.stderr

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

12 lines
437 B
Plaintext
Raw Normal View History

2020-05-20 17:58:41 +00:00
error: lifetime may not live long enough
--> $DIR/E0621-does-not-trigger-for-closures.rs:13:45
2018-02-08 03:35:35 +00:00
|
2019-03-09 12:03:44 +00:00
LL | invoke(&x, |a, b| if a > b { a } else { b });
2020-05-20 17:58:41 +00:00
| -- ^ returning this value requires that `'1` must outlive `'2`
| ||
| |return type of closure is &'2 i32
| has type `&'1 i32`
2018-02-08 03:35:35 +00:00
error: aborting due to 1 previous error
2018-02-08 03:35:35 +00:00