rust/src/test/ui/span/issue-11925.stderr
2017-12-14 22:45:45 -08:00

14 lines
502 B
Text

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