fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB29 linesraw
1error[E0382]: use of moved value: `b`
2  --> $DIR/issue-27282-move-match-input-into-guard.rs:14:5
3   |
4LL |     let b = &mut true;
5   |         - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
6LL |     match b {
7   |     ^^^^^^^ value used here after move
8...
9LL |         _ if { (|| { let bar = b; *bar = false; })();
10   |                 --             - variable moved due to use in closure
11   |                 |
12   |                 value moved into closure here
13
14error[E0382]: use of moved value: `b`
15  --> $DIR/issue-27282-move-match-input-into-guard.rs:24:5
16   |
17LL |     let b = &mut true;
18   |         - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
19LL |     match b {
20   |     ^^^^^^^ value used here after move
21...
22LL |             (|| { let bar = b; *bar = false; })();
23   |              --             - variable moved due to use in closure
24   |              |
25   |              value moved into closure here
26
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0382`.