]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-out-of-array-ref.stderr
slice_patterns: remove gates in tests
[rust.git] / src / test / 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    |             -          ^^
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
12 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
13   --> $DIR/move-out-of-array-ref.rs:13:27
14    |
15 LL |     let [_, s @ .. , _] = *a;
16    |             ------        ^^
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
23 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
24   --> $DIR/move-out-of-array-ref.rs:18:24
25    |
26 LL |     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
34 error[E0508]: cannot move out of type `[D; 4]`, a non-copy array
35   --> $DIR/move-out-of-array-ref.rs:23:27
36    |
37 LL |     let [_, s @ .. , _] = *a;
38    |             ------        ^^
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
45 error: aborting due to 4 previous errors
46
47 For more information about this error, try `rustc --explain E0508`.