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