1 error[E0382]: use of moved value: `my_str`
2 --> $DIR/borrowck-drop-from-guard.rs:11:23
4 LL | let my_str = "hello".to_owned();
5 | ------ move occurs because `my_str` has type `String`, which does not implement the `Copy` trait
7 LL | Some(_) if { drop(my_str); false } => {}
8 | ------ value moved here
10 LL | None => { foo(my_str); }
11 | ^^^^^^ value used here after move
13 help: consider cloning the value if the performance cost is acceptable
15 LL | Some(_) if { drop(my_str.clone()); false } => {}
18 error[E0382]: use of moved value: `my_str`
19 --> $DIR/borrowck-drop-from-guard.rs:18:23
21 LL | let my_str = "hello".to_owned();
22 | ------ move occurs because `my_str` has type `String`, which does not implement the `Copy` trait
24 LL | Some(_) if let Some(()) = { drop(my_str); None } => {}
25 | ------ value moved here
27 LL | None => { foo(my_str); }
28 | ^^^^^^ value used here after move
30 help: consider cloning the value if the performance cost is acceptable
32 LL | Some(_) if let Some(()) = { drop(my_str.clone()); None } => {}
35 error: aborting due to 2 previous errors
37 For more information about this error, try `rustc --explain E0382`.