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

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

81 lines
2.4 KiB
Plaintext
Raw Normal View History

warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/move-out-of-slice-2.rs:1:12
|
LL | #![feature(unsized_locals)]
| ^^^^^^^^^^^^^^
|
= note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
2022-09-18 10:55:36 -05:00
= note: `#[warn(incomplete_features)]` on by default
2019-12-15 10:14:24 -06:00
error[E0508]: cannot move out of type `[A]`, a non-copy slice
--> $DIR/move-out-of-slice-2.rs:11:11
2019-12-15 10:14:24 -06:00
|
LL | match *a {
| ^^ cannot move out of here
LL |
LL | [a @ ..] => {}
| -
2019-12-15 10:14:24 -06:00
| |
| data moved here
| move occurs because `a` has type `[A]`, which does not implement the `Copy` trait
|
help: consider borrowing the pattern binding
|
LL | [ref a @ ..] => {}
| +++
2019-12-15 10:14:24 -06:00
error[E0508]: cannot move out of type `[A]`, a non-copy slice
--> $DIR/move-out-of-slice-2.rs:17:11
2019-12-15 10:14:24 -06:00
|
LL | match *b {
| ^^ cannot move out of here
LL |
LL | [_, _, b @ .., _] => {}
| -
2019-12-15 10:14:24 -06:00
| |
| data moved here
| move occurs because `b` has type `[A]`, which does not implement the `Copy` trait
|
help: consider borrowing the pattern binding
|
LL | [_, _, ref b @ .., _] => {}
| +++
2019-12-15 10:14:24 -06:00
error[E0508]: cannot move out of type `[C]`, a non-copy slice
--> $DIR/move-out-of-slice-2.rs:25:11
2019-12-15 10:14:24 -06:00
|
LL | match *c {
| ^^ cannot move out of here
LL |
LL | [c @ ..] => {}
| -
2019-12-15 10:14:24 -06:00
| |
| data moved here
| move occurs because `c` has type `[C]`, which does not implement the `Copy` trait
|
help: consider borrowing the pattern binding
|
LL | [ref c @ ..] => {}
| +++
2019-12-15 10:14:24 -06:00
error[E0508]: cannot move out of type `[C]`, a non-copy slice
--> $DIR/move-out-of-slice-2.rs:31:11
2019-12-15 10:14:24 -06:00
|
LL | match *d {
| ^^ cannot move out of here
LL |
LL | [_, _, d @ .., _] => {}
| -
2019-12-15 10:14:24 -06:00
| |
| data moved here
| move occurs because `d` has type `[C]`, which does not implement the `Copy` trait
|
help: consider borrowing the pattern binding
|
LL | [_, _, ref d @ .., _] => {}
| +++
2019-12-15 10:14:24 -06:00
error: aborting due to 4 previous errors; 1 warning emitted
2019-12-15 10:14:24 -06:00
For more information about this error, try `rustc --explain E0508`.