]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-out-of-slice-2.stderr
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / moves / move-out-of-slice-2.stderr
1 warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
2   --> $DIR/move-out-of-slice-2.rs:1:12
3    |
4 LL | #![feature(unsized_locals)]
5    |            ^^^^^^^^^^^^^^
6    |
7    = note: `#[warn(incomplete_features)]` on by default
8    = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
9
10 error[E0508]: cannot move out of type `[A]`, a non-copy slice
11   --> $DIR/move-out-of-slice-2.rs:10:11
12    |
13 LL |     match *a {
14    |           ^^ cannot move out of here
15 LL |
16 LL |         [a @ ..] => {}
17    |          ------
18    |          |
19    |          data moved here
20    |          move occurs because `a` has type `[A]`, which does not implement the `Copy` trait
21
22 error[E0508]: cannot move out of type `[A]`, a non-copy slice
23   --> $DIR/move-out-of-slice-2.rs:16:11
24    |
25 LL |     match *b {
26    |           ^^ cannot move out of here
27 LL |
28 LL |         [_, _, b @ .., _] => {}
29    |                ------
30    |                |
31    |                data moved here
32    |                move occurs because `b` has type `[A]`, which does not implement the `Copy` trait
33
34 error[E0508]: cannot move out of type `[C]`, a non-copy slice
35   --> $DIR/move-out-of-slice-2.rs:24:11
36    |
37 LL |     match *c {
38    |           ^^ cannot move out of here
39 LL |
40 LL |         [c @ ..] => {}
41    |          ------
42    |          |
43    |          data moved here
44    |          move occurs because `c` has type `[C]`, which does not implement the `Copy` trait
45
46 error[E0508]: cannot move out of type `[C]`, a non-copy slice
47   --> $DIR/move-out-of-slice-2.rs:30:11
48    |
49 LL |     match *d {
50    |           ^^ cannot move out of here
51 LL |
52 LL |         [_, _, d @ .., _] => {}
53    |                ------
54    |                |
55    |                data moved here
56    |                move occurs because `d` has type `[C]`, which does not implement the `Copy` trait
57
58 error: aborting due to 4 previous errors; 1 warning emitted
59
60 For more information about this error, try `rustc --explain E0508`.