]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-27282-move-match-input-into-guard.stderr
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-27282-move-match-input-into-guard.stderr
CommitLineData
0bf4aa26 1error[E0382]: use of moved value: `b`
e74abb32 2 --> $DIR/issue-27282-move-match-input-into-guard.rs:16:14
94b46f34 3 |
9fa01778
XL
4LL | let b = &mut true;
5 | - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
6...
94b46f34 7LL | _ if { (|| { let bar = b; *bar = false; })();
b7449926
XL
8 | -- - variable moved due to use in closure
9 | |
10 | value moved into closure here
0bf4aa26 11LL | false } => { },
94b46f34
XL
12LL | &mut true => { println!("You might think we should get here"); },
13 | ^^^^ value used here after move
14
0bf4aa26 15error: aborting due to previous error
94b46f34 16
0bf4aa26 17For more information about this error, try `rustc --explain E0382`.