]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
Update tests to remove old numeric constants
[rust.git] / src / test / ui / moves / moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
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:9:28
3    |
4 LL |     let i = box 3;
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
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0507`.