| error[E0007]: cannot bind by-move with sub-bindings |
| --> $DIR/E0007.rs:6:9 |
| | |
| LL | op_string @ Some(s) => {}, |
| | ^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it |
| |
| error[E0382]: use of moved value |
| --> $DIR/E0007.rs:6:26 |
| | |
| LL | let x = Some("s".to_string()); |
| | - move occurs because `x` has type `std::option::Option<std::string::String>`, which does not implement the `Copy` trait |
| LL | match x { |
| LL | op_string @ Some(s) => {}, |
| | -----------------^- |
| | | | |
| | | value used here after move |
| | value moved here |
| |
| error: aborting due to 2 previous errors |
| |
| Some errors have detailed explanations: E0007, E0382. |
| For more information about an error, try `rustc --explain E0007`. |