1 error[E0382]: use of moved value: `my_str`
2 --> $DIR/borrowck-drop-from-guard.rs:11:23
4 LL | Some(_) if { drop(my_str); false } => {}
5 | ------ value moved here
7 LL | None => { foo(my_str); } //~ ERROR [E0382]
8 | ^^^^^^ value used here after move
10 = note: move occurs because `my_str` has type `std::string::String`, which does not implement the `Copy` trait
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0382`.