fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
654 B18 linesraw
1error[E0507]: cannot move out of `var`, a captured variable in an `FnMut` closure
2  --> $DIR/option-content-move2.rs:9:9
3   |
4LL |     let mut var = None;
5   |         ------- captured outer variable
6...
7LL |         move || {
8   |         ^^^^^^^ move out of `var` occurs here
9LL |
10LL |             var = Some(NotCopyable);
11   |             ---
12   |             |
13   |             move occurs because `var` has type `std::option::Option<NotCopyable>`, which does not implement the `Copy` trait
14   |             move occurs due to use in closure
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0507`.