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