error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/overlapping_spans.rs:20:11 | LL | match (S {f:"foo".to_string()}) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here LL | S {f:_s} => {} //~ ERROR cannot move out | -- data moved here | note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait --> $DIR/overlapping_spans.rs:21:14 | LL | S {f:_s} => {} //~ ERROR cannot move out | ^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0509`.