]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-out-of-slice-2.stderr
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / 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: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
8    = note: `#[warn(incomplete_features)]` on by default
9
10 error[E0508]: cannot move out of type `[A]`, a non-copy slice
11   --> $DIR/move-out-of-slice-2.rs:11: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 help: consider borrowing the pattern binding
23    |
24 LL |         [ref a @ ..] => {}
25    |          +++
26
27 error[E0508]: cannot move out of type `[A]`, a non-copy slice
28   --> $DIR/move-out-of-slice-2.rs:17:11
29    |
30 LL |     match *b {
31    |           ^^ cannot move out of here
32 LL |
33 LL |         [_, _, b @ .., _] => {}
34    |                -
35    |                |
36    |                data moved here
37    |                move occurs because `b` has type `[A]`, which does not implement the `Copy` trait
38    |
39 help: consider borrowing the pattern binding
40    |
41 LL |         [_, _, ref b @ .., _] => {}
42    |                +++
43
44 error[E0508]: cannot move out of type `[C]`, a non-copy slice
45   --> $DIR/move-out-of-slice-2.rs:25:11
46    |
47 LL |     match *c {
48    |           ^^ cannot move out of here
49 LL |
50 LL |         [c @ ..] => {}
51    |          -
52    |          |
53    |          data moved here
54    |          move occurs because `c` has type `[C]`, which does not implement the `Copy` trait
55    |
56 help: consider borrowing the pattern binding
57    |
58 LL |         [ref c @ ..] => {}
59    |          +++
60
61 error[E0508]: cannot move out of type `[C]`, a non-copy slice
62   --> $DIR/move-out-of-slice-2.rs:31:11
63    |
64 LL |     match *d {
65    |           ^^ cannot move out of here
66 LL |
67 LL |         [_, _, d @ .., _] => {}
68    |                -
69    |                |
70    |                data moved here
71    |                move occurs because `d` has type `[C]`, which does not implement the `Copy` trait
72    |
73 help: consider borrowing the pattern binding
74    |
75 LL |         [_, _, ref d @ .., _] => {}
76    |                +++
77
78 error: aborting due to 4 previous errors; 1 warning emitted
79
80 For more information about this error, try `rustc --explain E0508`.