1 error[E0507]: cannot move out of a shared reference
2 --> $DIR/duplicate-suggestions.rs:39:27
4 LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone());
5 | --------------- ^^^^^^^^^^^^^^^^^^^^^^^
9 | help: consider removing the `&`: `(X(_t), X(_u))`
11 note: move occurs because these variables have types that don't implement the `Copy` trait
12 --> $DIR/duplicate-suggestions.rs:39:13
14 LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone());
17 error[E0507]: cannot move out of a shared reference
18 --> $DIR/duplicate-suggestions.rs:43:50
20 LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
21 | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^
25 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
27 note: move occurs because these variables have types that don't implement the `Copy` trait
28 --> $DIR/duplicate-suggestions.rs:43:26
30 LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
33 error[E0507]: cannot move out of a shared reference
34 --> $DIR/duplicate-suggestions.rs:47:53
36 LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
37 | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^
41 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
43 note: move occurs because these variables have types that don't implement the `Copy` trait
44 --> $DIR/duplicate-suggestions.rs:47:29
46 LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
49 error[E0507]: cannot move out of a shared reference
50 --> $DIR/duplicate-suggestions.rs:51:11
52 LL | match &(e.clone(), e.clone()) {
53 | ^^^^^^^^^^^^^^^^^^^^^^^
55 LL | &(Either::One(_t), Either::Two(_u)) => (),
60 LL | &(Either::Two(_t), Either::One(_u)) => (),
61 | -- ...and here -- ...and here
63 note: move occurs because these variables have types that don't implement the `Copy` trait
64 --> $DIR/duplicate-suggestions.rs:53:23
66 LL | &(Either::One(_t), Either::Two(_u)) => (),
69 LL | &(Either::Two(_t), Either::One(_u)) => (),
71 help: consider removing the `&`
73 LL | (Either::One(_t), Either::Two(_u)) => (),
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75 help: consider removing the `&`
77 LL | (Either::Two(_t), Either::One(_u)) => (),
78 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80 error[E0507]: cannot move out of a shared reference
81 --> $DIR/duplicate-suggestions.rs:61:11
83 LL | match &(e.clone(), e.clone()) {
84 | ^^^^^^^^^^^^^^^^^^^^^^^
86 LL | &(Either::One(_t), Either::Two(_u))
87 | -----------------------------------
91 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
93 note: move occurs because these variables have types that don't implement the `Copy` trait
94 --> $DIR/duplicate-suggestions.rs:63:23
96 LL | &(Either::One(_t), Either::Two(_u))
99 error[E0507]: cannot move out of a shared reference
100 --> $DIR/duplicate-suggestions.rs:70:11
102 LL | match &(e.clone(), e.clone()) {
103 | ^^^^^^^^^^^^^^^^^^^^^^^
105 LL | &(Either::One(_t), Either::Two(_u)) => (),
106 | -----------------------------------
110 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
112 note: move occurs because these variables have types that don't implement the `Copy` trait
113 --> $DIR/duplicate-suggestions.rs:72:23
115 LL | &(Either::One(_t), Either::Two(_u)) => (),
118 error[E0507]: cannot move out of a shared reference
119 --> $DIR/duplicate-suggestions.rs:78:11
121 LL | match &(e.clone(), e.clone()) {
122 | ^^^^^^^^^^^^^^^^^^^^^^^
124 LL | &(Either::One(_t), Either::Two(_u)) => (),
125 | -----------------------------------
129 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
131 note: move occurs because these variables have types that don't implement the `Copy` trait
132 --> $DIR/duplicate-suggestions.rs:80:23
134 LL | &(Either::One(_t), Either::Two(_u)) => (),
137 error[E0507]: cannot move out of a mutable reference
138 --> $DIR/duplicate-suggestions.rs:91:31
140 LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
141 | ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145 | help: consider removing the `&mut`: `(X(_t), X(_u))`
147 note: move occurs because these variables have types that don't implement the `Copy` trait
148 --> $DIR/duplicate-suggestions.rs:91:17
150 LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
153 error[E0507]: cannot move out of a mutable reference
154 --> $DIR/duplicate-suggestions.rs:95:54
156 LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
157 | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
163 note: move occurs because these variables have types that don't implement the `Copy` trait
164 --> $DIR/duplicate-suggestions.rs:95:30
166 LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
169 error[E0507]: cannot move out of a mutable reference
170 --> $DIR/duplicate-suggestions.rs:99:57
172 LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
173 | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
177 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
179 note: move occurs because these variables have types that don't implement the `Copy` trait
180 --> $DIR/duplicate-suggestions.rs:99:33
182 LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
185 error[E0507]: cannot move out of a mutable reference
186 --> $DIR/duplicate-suggestions.rs:103:11
188 LL | match &mut (em.clone(), em.clone()) {
189 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
196 LL | &mut (Either::Two(_t), Either::One(_u)) => (),
197 | -- ...and here -- ...and here
199 note: move occurs because these variables have types that don't implement the `Copy` trait
200 --> $DIR/duplicate-suggestions.rs:105:27
202 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
205 LL | &mut (Either::Two(_t), Either::One(_u)) => (),
207 help: consider removing the `&mut`
209 LL | (Either::One(_t), Either::Two(_u)) => (),
210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 help: consider removing the `&mut`
213 LL | (Either::Two(_t), Either::One(_u)) => (),
214 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216 error[E0507]: cannot move out of a mutable reference
217 --> $DIR/duplicate-suggestions.rs:113:11
219 LL | match &mut (em.clone(), em.clone()) {
220 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222 LL | &mut (Either::One(_t), Either::Two(_u))
223 | ---------------------------------------
227 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
229 note: move occurs because these variables have types that don't implement the `Copy` trait
230 --> $DIR/duplicate-suggestions.rs:115:27
232 LL | &mut (Either::One(_t), Either::Two(_u))
235 error[E0507]: cannot move out of a mutable reference
236 --> $DIR/duplicate-suggestions.rs:122:11
238 LL | match &mut (em.clone(), em.clone()) {
239 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
241 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
242 | ---------------------------------------
246 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
248 note: move occurs because these variables have types that don't implement the `Copy` trait
249 --> $DIR/duplicate-suggestions.rs:124:27
251 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
254 error[E0507]: cannot move out of a mutable reference
255 --> $DIR/duplicate-suggestions.rs:130:11
257 LL | match &mut (em.clone(), em.clone()) {
258 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
260 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
261 | ---------------------------------------
265 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
267 note: move occurs because these variables have types that don't implement the `Copy` trait
268 --> $DIR/duplicate-suggestions.rs:132:27
270 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
273 error[E0507]: cannot move out of a mutable reference
274 --> $DIR/duplicate-suggestions.rs:138:11
276 LL | match &mut (em.clone(), em.clone()) {
277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
279 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
280 | ---------------------------------------
284 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
286 note: move occurs because these variables have types that don't implement the `Copy` trait
287 --> $DIR/duplicate-suggestions.rs:140:27
289 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
292 error[E0507]: cannot move out of a shared reference
293 --> $DIR/duplicate-suggestions.rs:86:11
295 LL | fn f5(&(X(_t), X(_u)): &(X, X)) { }
300 | help: consider removing the `&`: `(X(_t), X(_u))`
302 note: move occurs because these variables have types that don't implement the `Copy` trait
303 --> $DIR/duplicate-suggestions.rs:86:15
305 LL | fn f5(&(X(_t), X(_u)): &(X, X)) { }
308 error[E0507]: cannot move out of a mutable reference
309 --> $DIR/duplicate-suggestions.rs:146:11
311 LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
312 | ^^^^^^^^--^^^^^--^^
316 | help: consider removing the `&mut`: `(X(_t), X(_u))`
318 note: move occurs because these variables have types that don't implement the `Copy` trait
319 --> $DIR/duplicate-suggestions.rs:146:19
321 LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
324 error: aborting due to 17 previous errors
326 For more information about this error, try `rustc --explain E0507`.