]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-out-of-array-ref.stderr
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / moves / move-out-of-array-ref.stderr
1 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
2   --> $DIR/move-out-of-array-ref.rs:8:24
3    |
4 LL |     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    |
10 help: consider removing the dereference here
11    |
12 LL -     let [_, e, _, _] = *a;
13 LL +     let [_, e, _, _] = a;
14    |
15
16 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
17   --> $DIR/move-out-of-array-ref.rs:13:27
18    |
19 LL |     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    |
25 help: consider removing the dereference here
26    |
27 LL -     let [_, s @ .. , _] = *a;
28 LL +     let [_, s @ .. , _] = a;
29    |
30
31 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
32   --> $DIR/move-out-of-array-ref.rs:18:24
33    |
34 LL |     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    |
40 help: consider removing the dereference here
41    |
42 LL -     let [_, e, _, _] = *a;
43 LL +     let [_, e, _, _] = a;
44    |
45
46 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
47   --> $DIR/move-out-of-array-ref.rs:23:27
48    |
49 LL |     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    |
55 help: consider removing the dereference here
56    |
57 LL -     let [_, s @ .. , _] = *a;
58 LL +     let [_, s @ .. , _] = a;
59    |
60
61 error: aborting due to 4 previous errors
62
63 For more information about this error, try `rustc --explain E0508`.