| error[E0508]: cannot move out of type `[Struct]`, a non-copy slice |
| --> $DIR/cant_move_out_of_pattern.rs:9:11 |
| | |
| LL | match b { |
| | ^ cannot move out of here |
| LL | |
| LL | deref!([x]) => x, |
| | - |
| | | |
| | data moved here |
| | move occurs because `x` has type `Struct`, which does not implement the `Copy` trait |
| | |
| help: consider borrowing the pattern binding |
| | |
| LL | deref!([ref x]) => x, |
| | +++ |
| |
| error[E0507]: cannot move out of a shared reference |
| --> $DIR/cant_move_out_of_pattern.rs:17:11 |
| | |
| LL | match rc { |
| | ^^ |
| LL | |
| LL | deref!(x) => x, |
| | - |
| | | |
| | data moved here |
| | move occurs because `x` has type `Struct`, which does not implement the `Copy` trait |
| | |
| help: consider borrowing the pattern binding |
| | |
| LL | deref!(ref x) => x, |
| | +++ |
| |
| error[E0508]: cannot move out of type `[Struct]`, a non-copy slice |
| --> $DIR/cant_move_out_of_pattern.rs:25:11 |
| | |
| LL | match b { |
| | ^ cannot move out of here |
| LL | |
| LL | [x] => x, |
| | - |
| | | |
| | data moved here |
| | move occurs because `x` has type `Struct`, which does not implement the `Copy` trait |
| | |
| help: consider borrowing the pattern binding |
| | |
| LL | [ref x] => x, |
| | +++ |
| |
| error[E0507]: cannot move out of a shared reference |
| --> $DIR/cant_move_out_of_pattern.rs:35:11 |
| | |
| LL | match rc { |
| | ^^ |
| LL | |
| LL | Container(x) => x, |
| | - |
| | | |
| | data moved here |
| | move occurs because `x` has type `Struct`, which does not implement the `Copy` trait |
| | |
| help: consider borrowing the pattern binding |
| | |
| LL | Container(ref x) => x, |
| | +++ |
| |
| error: aborting due to 4 previous errors |
| |
| Some errors have detailed explanations: E0507, E0508. |
| For more information about an error, try `rustc --explain E0507`. |