blob: 67d60fe085ad278c2a72306e3cf97a8e935086b0 (
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(s)
|