rust/tests/ui/nll/issue-48238.stderr
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

14 lines
463 B
Plaintext

error: lifetime may not live long enough
--> $DIR/issue-48238.rs:9:13
|
LL | move || use_val(&orig);
| ------- ^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
| | |
| | return type of closure is &'2 u8
| lifetime `'1` represents this closure's body
|
= note: closure implements `Fn`, so references to captured variables can't escape the closure
error: aborting due to 1 previous error