1 error[E0382]: use of moved value: `a`
2 --> $DIR/issue-31287-drop-in-guard.rs:7:9
4 LL | let a = Some("...".to_owned());
5 | - move occurs because `a` has type `Option<String>`, which does not implement the `Copy` trait
7 LL | Some(_) if { drop(a); false } => None,
10 | ^ value used here after move
12 help: consider cloning the value if the performance cost is acceptable
14 LL | Some(_) if { drop(a.clone()); false } => None,
17 error[E0382]: use of moved value: `a`
18 --> $DIR/issue-31287-drop-in-guard.rs:13:9
20 LL | let a = Some("...".to_owned());
21 | - move occurs because `a` has type `Option<String>`, which does not implement the `Copy` trait
22 LL | let b = match a {
23 LL | Some(_) if let Some(()) = { drop(a); None } => None,
26 | ^ value used here after move
28 help: consider cloning the value if the performance cost is acceptable
30 LL | Some(_) if let Some(()) = { drop(a.clone()); None } => None,
33 error: aborting due to 2 previous errors
35 For more information about this error, try `rustc --explain E0382`.