]>
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 | | |
c295e0f8 | 4 | LL | let t: Box<_> = Box::new(3); |
1b1a35ee | 5 | | - move occurs because `t` has type `Box<isize>`, which does not implement the `Copy` trait |
923072b8 | 6 | LL | |
b7449926 | 7 | LL | call_f(move|| { *t + 1 }); |
17df50a5 | 8 | | ------ -- variable moved due to use in closure |
b7449926 XL |
9 | | | |
10 | | value moved into closure here | |
532ac7d7 | 11 | LL | call_f(move|| { *t + 1 }); |
17df50a5 | 12 | | ^^^^^^ -- use occurs due to use in closure |
b7449926 XL |
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`. |