fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
874 B17 linesraw
1error[E0507]: cannot move out of `bar`, a captured variable in an `FnMut` closure
2  --> $DIR/borrowck-move-by-capture.rs:9:29
3   |
4LL |     let bar: Box<_> = Box::new(3);
5   |         --- captured outer variable
6LL |     let _g = to_fn_mut(|| {
7   |                        -- captured by this `FnMut` closure
8LL |         let _h = to_fn_once(move || -> isize { *bar });
9   |                             ^^^^^^^^^^^^^^^^   ----
10   |                             |                  |
11   |                             |                  variable moved due to use in closure
12   |                             |                  move occurs because `bar` has type `Box<isize>`, which does not implement the `Copy` trait
13   |                             `bar` is moved here
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0507`.