2018-08-08 12:28:26 +00:00
|
|
|
error[E0508]: cannot move out of type `[A]`, a non-copy slice
|
2019-04-22 07:40:08 +00:00
|
|
|
--> $DIR/move-out-of-slice-1.rs:7:11
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
LL | match a {
|
|
|
|
| ^ cannot move out of here
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | box [a] => {},
|
2019-05-05 11:02:32 +00:00
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| data moved here
|
|
|
|
| move occurs because `a` has type `A`, which does not implement the `Copy` trait
|
2022-12-09 01:14:56 +00:00
|
|
|
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | box [ref a] => {},
|
|
|
|
| +++
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0508`.
|