fork/rust

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

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

master
2.0 KiB63 linesraw
1error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
2  --> $DIR/move-out-of-array-ref.rs:8:24
3   |
4LL |     let [_, e, _, _] = *a;
5   |             -          ^^ cannot move out of here
6   |             |
7   |             data moved here
8   |             move occurs because `e` has type `D`, which does not implement the `Copy` trait
9   |
10help: consider removing the dereference here
11   |
12LL -     let [_, e, _, _] = *a;
13LL +     let [_, e, _, _] = a;
14   |
15
16error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
17  --> $DIR/move-out-of-array-ref.rs:13:27
18   |
19LL |     let [_, s @ .. , _] = *a;
20   |             -             ^^ cannot move out of here
21   |             |
22   |             data moved here
23   |             move occurs because `s` has type `[D; 2]`, which does not implement the `Copy` trait
24   |
25help: consider removing the dereference here
26   |
27LL -     let [_, s @ .. , _] = *a;
28LL +     let [_, s @ .. , _] = a;
29   |
30
31error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
32  --> $DIR/move-out-of-array-ref.rs:18:24
33   |
34LL |     let [_, e, _, _] = *a;
35   |             -          ^^ cannot move out of here
36   |             |
37   |             data moved here
38   |             move occurs because `e` has type `D`, which does not implement the `Copy` trait
39   |
40help: consider removing the dereference here
41   |
42LL -     let [_, e, _, _] = *a;
43LL +     let [_, e, _, _] = a;
44   |
45
46error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
47  --> $DIR/move-out-of-array-ref.rs:23:27
48   |
49LL |     let [_, s @ .. , _] = *a;
50   |             -             ^^ cannot move out of here
51   |             |
52   |             data moved here
53   |             move occurs because `s` has type `[D; 2]`, which does not implement the `Copy` trait
54   |
55help: consider removing the dereference here
56   |
57LL -     let [_, s @ .. , _] = *a;
58LL +     let [_, s @ .. , _] = a;
59   |
60
61error: aborting due to 4 previous errors
62
63For more information about this error, try `rustc --explain E0508`.