1 error[E0507]: cannot move out of `*a` which is behind a shared reference
2 --> $DIR/move-errors.rs:6:13
7 | move occurs because `*a` has type `A`, which does not implement the `Copy` trait
8 | help: consider removing the `*`: `a`
10 error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
11 --> $DIR/move-errors.rs:12:13
16 | cannot move out of here
17 | move occurs because `a[_]` has type `A`, which does not implement the `Copy` trait
18 | help: consider borrowing here: `&a[0]`
20 error[E0507]: cannot move out of `**r` which is behind a shared reference
21 --> $DIR/move-errors.rs:19:13
26 | move occurs because `**r` has type `A`, which does not implement the `Copy` trait
27 | help: consider removing the `*`: `*r`
29 error[E0507]: cannot move out of an `Rc`
30 --> $DIR/move-errors.rs:27:13
35 | move occurs because value has type `A`, which does not implement the `Copy` trait
36 | help: consider removing the `*`: `r`
38 error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
39 --> $DIR/move-errors.rs:32:13
41 LL | let a = [A("".to_string())][0];
42 | ^^^^^^^^^^^^^^^^^^^^^^
44 | cannot move out of here
45 | move occurs because value has type `A`, which does not implement the `Copy` trait
46 | help: consider borrowing here: `&[A("".to_string())][0]`
48 error[E0507]: cannot move out of `a.0` which is behind a shared reference
49 --> $DIR/move-errors.rs:38:16
52 | - ^^ help: consider removing the `*`: `a`
55 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
57 error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
58 --> $DIR/move-errors.rs:44:19
61 | - ^ cannot move out of here
64 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
66 error[E0507]: cannot move out of `*a` which is behind a shared reference
67 --> $DIR/move-errors.rs:51:9
70 | ^^ move occurs because `*a` has type `A`, which does not implement the `Copy` trait
72 error[E0508]: cannot move out of type `[B; 1]`, a non-copy array
73 --> $DIR/move-errors.rs:74:11
78 | cannot move out of here
79 | help: consider borrowing here: `&x[0]`
86 note: move occurs because these variables have types that don't implement the `Copy` trait
87 --> $DIR/move-errors.rs:76:14
94 error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
95 --> $DIR/move-errors.rs:83:11
98 | ^ cannot move out of here
100 LL | B::U(D(s)) => (),
104 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
106 error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
107 --> $DIR/move-errors.rs:92:11
110 | ^ cannot move out of here
112 LL | (D(s), &t) => (),
116 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
118 error[E0507]: cannot move out of `*x.1` which is behind a shared reference
119 --> $DIR/move-errors.rs:92:11
124 LL | (D(s), &t) => (),
128 | move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait
130 error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
131 --> $DIR/move-errors.rs:102:11
134 | ^ cannot move out of here
136 LL | F(s, mut t) => (),
137 | - ----- ...and here
141 note: move occurs because these variables have types that don't implement the `Copy` trait
142 --> $DIR/move-errors.rs:104:11
144 LL | F(s, mut t) => (),
147 error[E0507]: cannot move out of `x.0` which is behind a shared reference
148 --> $DIR/move-errors.rs:110:11
151 | ^^ help: consider removing the `*`: `x`
153 LL | Ok(s) | Err(s) => (),
157 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
159 error: aborting due to 14 previous errors
161 Some errors have detailed explanations: E0507, E0508, E0509.
162 For more information about an error, try `rustc --explain E0507`.