1 error[E0515]: cannot return reference to local data `x`
2 --> $DIR/issue-11925.rs:18:35
4 LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough
5 | ^^ returns a reference to data owned by the current function
7 error: aborting due to previous error
9 For more information about this error, try `rustc --explain E0515`.