]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-27282-move-match-input-into-guard.stderr
Auto merge of #57885 - arielb1:xform-probe, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-27282-move-match-input-into-guard.stderr
1 error[E0382]: use of moved value: `b`
2   --> $DIR/issue-27282-move-match-input-into-guard.rs:18:14
3    |
4 LL |     let b = &mut true;
5    |         - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
6 ...
7 LL |         _ if { (|| { let bar = b; *bar = false; })();
8    |                 --             - variable moved due to use in closure
9    |                 |
10    |                 value moved into closure here
11 LL |                      false } => { },
12 LL |         &mut true => { println!("You might think we should get here"); },
13    |              ^^^^ value used here after move
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0382`.