fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
687 B18 linesraw
1error[E0382]: use of moved value: `t`
2  --> $DIR/borrowck-move-moved-value-into-closure.rs:11:12
3   |
4LL |     let t: Box<_> = box 3;
5   |         - move occurs because `t` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
6LL | 
7LL |     call_f(move|| { *t + 1 });
8   |            ------    - variable moved due to use in closure
9   |            |
10   |            value moved into closure here
11LL |     call_f(move|| { *t + 1 });
12   |            ^^^^^^    - use occurs due to use in closure
13   |            |
14   |            value used here after move
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0382`.