rust/tests/ui/moves/move-out-of-slice-1.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
585 B
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0508]: cannot move out of type `[A]`, a non-copy slice
--> $DIR/move-out-of-slice-1.rs:7:11
2018-08-08 12:28:26 +00:00
|
LL | match a {
| ^ cannot move out of here
2019-03-09 12:03:44 +00:00
LL | box [a] => {},
| -
| |
| data moved here
| move occurs because `a` has type `A`, which does not implement the `Copy` trait
|
help: consider borrowing the pattern binding
|
LL | box [ref a] => {},
| +++
2018-08-08 12:28:26 +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`.