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
435 B
Plaintext
Raw Normal View History

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