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