X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fissue-27282-move-match-input-into-guard.stderr;h=91c51bcd0582502f20de9d41e8ebd434d9cc2a60;hb=aa1e6db70900cf5d11a843bc4234de0548677aba;hp=d264bf8d2734df2146495a8e9120141e917f1603;hpb=71637c293768052e73940a0eb1ddb71ce9d24c40;p=rust.git diff --git a/src/test/ui/issue-27282-move-match-input-into-guard.stderr b/src/test/ui/issue-27282-move-match-input-into-guard.stderr index d264bf8d273..91c51bcd058 100644 --- a/src/test/ui/issue-27282-move-match-input-into-guard.stderr +++ b/src/test/ui/issue-27282-move-match-input-into-guard.stderr @@ -1,11 +1,13 @@ error[E0505]: cannot move out of `b` because it is borrowed - --> $DIR/issue-27282-move-match-input-into-guard.rs:26:16 + --> $DIR/issue-27282-move-match-input-into-guard.rs:26:17 | LL | match b { | - borrow of `b` occurs here LL | &mut false => {}, LL | _ if { (|| { let bar = b; *bar = false; })(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move out of `b` occurs here + | ^^ - move occurs due to use in closure + | | + | move out of `b` occurs here ... LL | &mut true => { println!("You might think we should get here"); }, | --------- borrow later used here @@ -14,7 +16,9 @@ error[E0382]: use of moved value: `*b` --> $DIR/issue-27282-move-match-input-into-guard.rs:29:14 | LL | _ if { (|| { let bar = b; *bar = false; })(); - | ----------------------------------- value moved here + | -- - variable moved due to use in closure + | | + | value moved into closure here ... LL | &mut true => { println!("You might think we should get here"); }, | ^^^^ value used here after move