rust/src/test/ui/span/issue-11925.stderr
Mikhail Modin a0e7e357a7 Improve "Doesn't live long enough" error
case with different lifetime with spans
2016-11-01 19:39:28 +03:00

15 lines
437 B
Plaintext

error: `x` does not live long enough
--> $DIR/issue-11925.rs:18:36
|
18 | let f = to_fn_once(move|| &x);
| ^
| |
| borrow occurs here
| `x` dropped here while still borrowed
...
23 | }
| - borrowed value needs to live until here
error: aborting due to previous error