]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-move-moved-value-into-closure.stderr
CommitLineData
b7449926 1error[E0382]: use of moved value: `t`
48663c56 2 --> $DIR/borrowck-move-moved-value-into-closure.rs:11:12
b7449926 3 |
c295e0f8 4LL | let t: Box<_> = Box::new(3);
1b1a35ee 5 | - move occurs because `t` has type `Box<isize>`, which does not implement the `Copy` trait
923072b8 6LL |
b7449926 7LL | call_f(move|| { *t + 1 });
17df50a5 8 | ------ -- variable moved due to use in closure
b7449926
XL
9 | |
10 | value moved into closure here
532ac7d7 11LL | 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
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0382`.