2016-08-16 15:02:20 -07:00
|
|
|
error: `x` does not live long enough
|
|
|
|
--> $DIR/issue-11925.rs:18:36
|
|
|
|
|
|
|
|
|
18 | let f = to_fn_once(move|| &x);
|
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| does not live long enough
|
2016-08-31 17:48:26 -07:00
|
|
|
| borrowed value only lives until here
|
2016-08-16 15:02:20 -07:00
|
|
|
...
|
|
|
|
23 | }
|
2016-08-31 17:48:26 -07:00
|
|
|
| - borrowed value needs to live until here
|
2016-08-16 15:02:20 -07:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|