]> git.proxmox.com Git - rustc.git/blame - src/test/ui/moves/move-out-of-array-ref.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / moves / move-out-of-array-ref.stderr
CommitLineData
dfeec247
XL
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 | - ^^
6 | | |
7 | | cannot move out of here
8 | | help: consider borrowing here: `&*a`
9 | data moved here
10 | move occurs because `e` has type `D`, which does not implement the `Copy` trait
11
12error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
13 --> $DIR/move-out-of-array-ref.rs:13:27
14 |
15LL | let [_, s @ .. , _] = *a;
f2b60f7d 16 | - ^^
dfeec247
XL
17 | | |
18 | | cannot move out of here
19 | | help: consider borrowing here: `&*a`
20 | data moved here
21 | move occurs because `s` has type `[D; 2]`, which does not implement the `Copy` trait
22
23error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
24 --> $DIR/move-out-of-array-ref.rs:18:24
25 |
26LL | let [_, e, _, _] = *a;
27 | - ^^
28 | | |
29 | | cannot move out of here
30 | | help: consider borrowing here: `&*a`
31 | data moved here
32 | move occurs because `e` has type `D`, which does not implement the `Copy` trait
33
34error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
35 --> $DIR/move-out-of-array-ref.rs:23:27
36 |
37LL | let [_, s @ .. , _] = *a;
f2b60f7d 38 | - ^^
dfeec247
XL
39 | | |
40 | | cannot move out of here
41 | | help: consider borrowing here: `&*a`
42 | data moved here
43 | move occurs because `s` has type `[D; 2]`, which does not implement the `Copy` trait
44
45error: aborting due to 4 previous errors
46
47For more information about this error, try `rustc --explain E0508`.