2018-10-16 10:10:04 -05:00
|
|
|
error[E0382]: use of moved value: `b`
|
2022-12-21 09:29:35 -06:00
|
|
|
--> $DIR/issue-27282-move-match-input-into-guard.rs:14:5
|
2018-05-15 16:23:00 -05:00
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | let b = &mut true;
|
|
|
|
| - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
|
2021-07-23 17:55:36 -05:00
|
|
|
LL | match b {
|
|
|
|
| ^^^^^^^ value used here after move
|
2019-01-02 18:43:08 -06:00
|
|
|
...
|
2018-05-15 16:23:00 -05:00
|
|
|
LL | _ if { (|| { let bar = b; *bar = false; })();
|
2018-08-01 15:02:10 -05:00
|
|
|
| -- - variable moved due to use in closure
|
|
|
|
| |
|
|
|
|
| value moved into closure here
|
2018-05-15 16:23:00 -05:00
|
|
|
|
2022-12-21 09:29:35 -06:00
|
|
|
error[E0382]: use of moved value: `b`
|
|
|
|
--> $DIR/issue-27282-move-match-input-into-guard.rs:24:5
|
|
|
|
|
|
|
|
|
LL | let b = &mut true;
|
|
|
|
| - move occurs because `b` has type `&mut bool`, which does not implement the `Copy` trait
|
|
|
|
LL | match b {
|
|
|
|
| ^^^^^^^ value used here after move
|
|
|
|
...
|
|
|
|
LL | (|| { let bar = b; *bar = false; })();
|
|
|
|
| -- - variable moved due to use in closure
|
|
|
|
| |
|
|
|
|
| value moved into closure here
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2018-05-15 16:23:00 -05:00
|
|
|
|
2018-09-13 16:04:09 -05:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|