1 error[E0507]: cannot move out of `i`, a captured variable in an `Fn` closure
2 --> $DIR/moves-based-on-type-move-out-of-closure-env-issue-1965.rs:11:28
5 | - captured outer variable
6 LL | let _f = to_fn(|| test(i));
7 | ^ move occurs because `i` has type `Box<usize>`, which does not implement the `Copy` trait
9 error: aborting due to previous error
11 For more information about this error, try `rustc --explain E0507`.