@@ -7,10 +7,11 @@ LL | let [_, e, _, _] = *a;
7
7
| data moved here
8
8
| move occurs because `e` has type `D`, which does not implement the `Copy` trait
9
9
|
10
- help: consider borrowing here
10
+ help: consider removing the dereference here
11
+ |
12
+ LL - let [_, e, _, _] = *a;
13
+ LL + let [_, e, _, _] = a;
11
14
|
12
- LL | let [_, e, _, _] = &*a;
13
- | +
14
15
15
16
error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
16
17
--> $DIR/move-out-of-array-ref.rs:13:27
@@ -21,10 +22,11 @@ LL | let [_, s @ .. , _] = *a;
21
22
| data moved here
22
23
| move occurs because `s` has type `[D; 2]`, which does not implement the `Copy` trait
23
24
|
24
- help: consider borrowing here
25
+ help: consider removing the dereference here
26
+ |
27
+ LL - let [_, s @ .. , _] = *a;
28
+ LL + let [_, s @ .. , _] = a;
25
29
|
26
- LL | let [_, s @ .. , _] = &*a;
27
- | +
28
30
29
31
error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
30
32
--> $DIR/move-out-of-array-ref.rs:18:24
@@ -35,10 +37,11 @@ LL | let [_, e, _, _] = *a;
35
37
| data moved here
36
38
| move occurs because `e` has type `D`, which does not implement the `Copy` trait
37
39
|
38
- help: consider borrowing here
40
+ help: consider removing the dereference here
41
+ |
42
+ LL - let [_, e, _, _] = *a;
43
+ LL + let [_, e, _, _] = a;
39
44
|
40
- LL | let [_, e, _, _] = &*a;
41
- | +
42
45
43
46
error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
44
47
--> $DIR/move-out-of-array-ref.rs:23:27
@@ -49,10 +52,11 @@ LL | let [_, s @ .. , _] = *a;
49
52
| data moved here
50
53
| move occurs because `s` has type `[D; 2]`, which does not implement the `Copy` trait
51
54
|
52
- help: consider borrowing here
55
+ help: consider removing the dereference here
56
+ |
57
+ LL - let [_, s @ .. , _] = *a;
58
+ LL + let [_, s @ .. , _] = a;
53
59
|
54
- LL | let [_, s @ .. , _] = &*a;
55
- | +
56
60
57
61
error: aborting due to 4 previous errors
58
62
0 commit comments