fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.4 KiB80 linesraw
1warning: 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   |
4LL | #![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
10error[E0508]: cannot move out of type `[A]`, a non-copy slice
11  --> $DIR/move-out-of-slice-2.rs:11:11
12   |
13LL |     match *a {
14   |           ^^ cannot move out of here
15LL |
16LL |         [a @ ..] => {}
17   |          -
18   |          |
19   |          data moved here
20   |          move occurs because `a` has type `[A]`, which does not implement the `Copy` trait
21   |
22help: consider borrowing the pattern binding
23   |
24LL |         [ref a @ ..] => {}
25   |          +++
26
27error[E0508]: cannot move out of type `[A]`, a non-copy slice
28  --> $DIR/move-out-of-slice-2.rs:17:11
29   |
30LL |     match *b {
31   |           ^^ cannot move out of here
32LL |
33LL |         [_, _, b @ .., _] => {}
34   |                -
35   |                |
36   |                data moved here
37   |                move occurs because `b` has type `[A]`, which does not implement the `Copy` trait
38   |
39help: consider borrowing the pattern binding
40   |
41LL |         [_, _, ref b @ .., _] => {}
42   |                +++
43
44error[E0508]: cannot move out of type `[C]`, a non-copy slice
45  --> $DIR/move-out-of-slice-2.rs:25:11
46   |
47LL |     match *c {
48   |           ^^ cannot move out of here
49LL |
50LL |         [c @ ..] => {}
51   |          -
52   |          |
53   |          data moved here
54   |          move occurs because `c` has type `[C]`, which does not implement the `Copy` trait
55   |
56help: consider borrowing the pattern binding
57   |
58LL |         [ref c @ ..] => {}
59   |          +++
60
61error[E0508]: cannot move out of type `[C]`, a non-copy slice
62  --> $DIR/move-out-of-slice-2.rs:31:11
63   |
64LL |     match *d {
65   |           ^^ cannot move out of here
66LL |
67LL |         [_, _, d @ .., _] => {}
68   |                -
69   |                |
70   |                data moved here
71   |                move occurs because `d` has type `[C]`, which does not implement the `Copy` trait
72   |
73help: consider borrowing the pattern binding
74   |
75LL |         [_, _, ref d @ .., _] => {}
76   |                +++
77
78error: aborting due to 4 previous errors; 1 warning emitted
79
80For more information about this error, try `rustc --explain E0508`.