blob: 119b86d528857043a8db35038946adb9703f99ef [file]
error[E0508]: cannot move out of type `[Struct]`, a non-copy slice
--> $DIR/cant_move_out_of_pattern.rs:8:11
|
LL | match b {
| ^ cannot move out of here
LL |
LL | deref!([x]) => x,
| - data moved here 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:16:11
|
LL | match rc {
| ^^
LL |
LL | deref!(x) => x,
| - data moved here 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:24:11
|
LL | match b {
| ^ cannot move out of here
LL |
LL | [x] => x,
| - data moved here 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:34:11
|
LL | match rc {
| ^^
LL |
LL | Container(x) => x,
| - data moved here 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`.