blob: 6b2942bc7a8a78a1c1887f907d60d7639efe25c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
error[E0597]: `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
|