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