]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-27282-move-match-input-into-guard.stderr
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / nll / 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:14:5
3    |
4 LL |     let b = &mut true;
5    |         - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
6 LL |     match b {
7    |     ^^^^^^^ value used here after move
8 ...
9 LL |         _ if { (|| { let bar = b; *bar = false; })();
10    |                 --             - variable moved due to use in closure
11    |                 |
12    |                 value moved into closure here
13
14 error[E0382]: use of moved value: `b`
15   --> $DIR/issue-27282-move-match-input-into-guard.rs:24:5
16    |
17 LL |     let b = &mut true;
18    |         - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
19 LL |     match b {
20    |     ^^^^^^^ value used here after move
21 ...
22 LL |             (|| { let bar = b; *bar = false; })();
23    |              --             - variable moved due to use in closure
24    |              |
25    |              value moved into closure here
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0382`.