rust/tests/ui/nll/mir_check_cast_closure.stderr

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

16 lines
514 B
Plaintext
Raw Normal View History

2018-12-11 21:49:40 +00:00
error: lifetime may not live long enough
2022-04-01 17:13:25 +00:00
--> $DIR/mir_check_cast_closure.rs:5:5
|
LL | fn bar<'a, 'b>() -> fn(&'a u32, &'b u32) -> &'a u32 {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
LL | let g: fn(_, _) -> _ = |_x, y| y;
2018-08-07 20:48:50 +00:00
LL | g
| ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
2018-11-28 21:05:36 +00:00
|
2019-10-27 14:39:14 +00:00
= help: consider adding the following bound: `'b: 'a`
2018-11-28 21:05:36 +00:00
error: aborting due to 1 previous error