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