1 error[E0507]: cannot move out of `s.0` which is behind a shared reference
2 --> $DIR/simple.rs:38:17
5 | -- ^^ help: consider removing the `*`: `s`
8 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
10 error[E0507]: cannot move out of `r.0` which is behind a shared reference
11 --> $DIR/simple.rs:42:30
13 LL | if let Either::One(_t) = *r { }
14 | -- ^^ help: consider removing the `*`: `r`
17 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
19 error[E0507]: cannot move out of `r.0` which is behind a shared reference
20 --> $DIR/simple.rs:46:33
22 LL | while let Either::One(_t) = *r { }
23 | -- ^^ help: consider removing the `*`: `r`
26 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
28 error[E0507]: cannot move out of `r.0` which is behind a shared reference
29 --> $DIR/simple.rs:50:11
32 | ^^ help: consider removing the `*`: `r`
38 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
40 error[E0507]: cannot move out of `r.0` which is behind a shared reference
41 --> $DIR/simple.rs:57:11
44 | ^^ help: consider removing the `*`: `r`
46 LL | Either::One(_t) => (),
50 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
52 error[E0507]: cannot move out of `sm.0` which is behind a mutable reference
53 --> $DIR/simple.rs:66:17
56 | -- ^^^ help: consider removing the `*`: `sm`
59 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
61 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
62 --> $DIR/simple.rs:70:30
64 LL | if let Either::One(_t) = *rm { }
65 | -- ^^^ help: consider removing the `*`: `rm`
68 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
70 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
71 --> $DIR/simple.rs:74:33
73 LL | while let Either::One(_t) = *rm { }
74 | -- ^^^ help: consider removing the `*`: `rm`
77 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
79 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
80 --> $DIR/simple.rs:78:11
83 | ^^^ help: consider removing the `*`: `rm`
89 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
91 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
92 --> $DIR/simple.rs:85:11
95 | ^^^ help: consider removing the `*`: `rm`
97 LL | Either::One(_t) => (),
101 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
103 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
104 --> $DIR/simple.rs:93:11
107 | ^^^ help: consider removing the `*`: `rm`
109 LL | Either::One(_t) => (),
113 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
115 error[E0507]: cannot move out of index of `std::vec::Vec<X>`
116 --> $DIR/simple.rs:102:17
118 LL | let X(_t) = vs[0];
119 | -- ^^^^^ help: consider borrowing here: `&vs[0]`
122 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
124 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
125 --> $DIR/simple.rs:106:30
127 LL | if let Either::One(_t) = vr[0] { }
128 | -- ^^^^^ help: consider borrowing here: `&vr[0]`
131 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
133 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
134 --> $DIR/simple.rs:110:33
136 LL | while let Either::One(_t) = vr[0] { }
137 | -- ^^^^^ help: consider borrowing here: `&vr[0]`
140 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
142 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
143 --> $DIR/simple.rs:114:11
146 | ^^^^^ help: consider borrowing here: `&vr[0]`
152 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
154 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
155 --> $DIR/simple.rs:121:11
158 | ^^^^^ help: consider borrowing here: `&vr[0]`
160 LL | Either::One(_t) => (),
164 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
166 error[E0507]: cannot move out of index of `std::vec::Vec<X>`
167 --> $DIR/simple.rs:130:17
169 LL | let X(_t) = vsm[0];
170 | -- ^^^^^^ help: consider borrowing here: `&vsm[0]`
173 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
175 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
176 --> $DIR/simple.rs:134:30
178 LL | if let Either::One(_t) = vrm[0] { }
179 | -- ^^^^^^ help: consider borrowing here: `&vrm[0]`
182 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
184 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
185 --> $DIR/simple.rs:138:33
187 LL | while let Either::One(_t) = vrm[0] { }
188 | -- ^^^^^^ help: consider borrowing here: `&vrm[0]`
191 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
193 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
194 --> $DIR/simple.rs:142:11
197 | ^^^^^^ help: consider borrowing here: `&vrm[0]`
203 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
205 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
206 --> $DIR/simple.rs:149:11
209 | ^^^^^^ help: consider borrowing here: `&vrm[0]`
211 LL | Either::One(_t) => (),
215 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
217 error[E0507]: cannot move out of index of `std::vec::Vec<Either>`
218 --> $DIR/simple.rs:157:11
221 | ^^^^^^ help: consider borrowing here: `&vrm[0]`
223 LL | Either::One(_t) => (),
227 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
229 error[E0507]: cannot move out of `s.0` which is behind a shared reference
230 --> $DIR/simple.rs:168:18
236 | | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
237 | help: consider removing the `&`: `X(_t)`
239 error[E0507]: cannot move out of `r.0` which is behind a shared reference
240 --> $DIR/simple.rs:172:31
242 LL | if let &Either::One(_t) = r { }
246 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
247 | help: consider removing the `&`: `Either::One(_t)`
249 error[E0507]: cannot move out of `r.0` which is behind a shared reference
250 --> $DIR/simple.rs:176:34
252 LL | while let &Either::One(_t) = r { }
256 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
257 | help: consider removing the `&`: `Either::One(_t)`
259 error[E0507]: cannot move out of `r.0` which is behind a shared reference
260 --> $DIR/simple.rs:180:11
265 LL | &Either::One(_t)
269 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
270 | help: consider removing the `&`: `Either::One(_t)`
272 error[E0507]: cannot move out of `r.0` which is behind a shared reference
273 --> $DIR/simple.rs:188:11
278 LL | &Either::One(_t) => (),
282 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
283 | help: consider removing the `&`: `Either::One(_t)`
285 error[E0507]: cannot move out of `r.0` which is behind a shared reference
286 --> $DIR/simple.rs:195:11
291 LL | &Either::One(_t) => (),
295 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
296 | help: consider removing the `&`: `Either::One(_t)`
298 error[E0507]: cannot move out of `sm.0` which is behind a mutable reference
299 --> $DIR/simple.rs:207:22
301 LL | let &mut X(_t) = sm;
305 | | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
306 | help: consider removing the `&mut`: `X(_t)`
308 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
309 --> $DIR/simple.rs:211:35
311 LL | if let &mut Either::One(_t) = rm { }
312 | -------------------- ^^
315 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
316 | help: consider removing the `&mut`: `Either::One(_t)`
318 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
319 --> $DIR/simple.rs:215:38
321 LL | while let &mut Either::One(_t) = rm { }
322 | -------------------- ^^
325 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
326 | help: consider removing the `&mut`: `Either::One(_t)`
328 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
329 --> $DIR/simple.rs:219:11
334 LL | &mut Either::One(_t) => (),
337 LL | &mut Either::Two(_t) => (),
340 note: move occurs because these variables have types that don't implement the `Copy` trait
341 --> $DIR/simple.rs:221:26
343 LL | &mut Either::One(_t) => (),
346 LL | &mut Either::Two(_t) => (),
348 help: consider removing the `&mut`
350 LL | Either::One(_t) => (),
352 help: consider removing the `&mut`
354 LL | Either::Two(_t) => (),
357 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
358 --> $DIR/simple.rs:228:11
363 LL | &mut Either::One(_t) => (),
364 | --------------------
367 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
368 | help: consider removing the `&mut`: `Either::One(_t)`
370 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
371 --> $DIR/simple.rs:235:11
376 LL | &mut Either::One(_t) => (),
377 | --------------------
380 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
381 | help: consider removing the `&mut`: `Either::One(_t)`
383 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
384 --> $DIR/simple.rs:242:11
389 LL | &mut Either::One(_t) => (),
390 | --------------------
393 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
394 | help: consider removing the `&mut`: `Either::One(_t)`
396 error[E0507]: cannot move out of a shared reference
397 --> $DIR/simple.rs:258:21
399 LL | let (&X(_t),) = (&x.clone(),);
403 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
405 error[E0507]: cannot move out of a shared reference
406 --> $DIR/simple.rs:260:34
408 LL | if let (&Either::One(_t),) = (&e.clone(),) { }
412 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
414 error[E0507]: cannot move out of a shared reference
415 --> $DIR/simple.rs:262:37
417 LL | while let (&Either::One(_t),) = (&e.clone(),) { }
421 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
423 error[E0507]: cannot move out of a shared reference
424 --> $DIR/simple.rs:264:11
426 LL | match (&e.clone(),) {
429 LL | (&Either::One(_t),)
433 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
435 error[E0507]: cannot move out of a mutable reference
436 --> $DIR/simple.rs:272:25
438 LL | let (&mut X(_t),) = (&mut xm.clone(),);
439 | -- ^^^^^^^^^^^^^^^^^^
442 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
444 error[E0507]: cannot move out of a mutable reference
445 --> $DIR/simple.rs:274:38
447 LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
448 | -- ^^^^^^^^^^^^^^^^^^
451 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
453 error[E0507]: cannot move out of a mutable reference
454 --> $DIR/simple.rs:276:41
456 LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
457 | -- ^^^^^^^^^^^^^^^^^^
460 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
462 error[E0507]: cannot move out of a mutable reference
463 --> $DIR/simple.rs:278:11
465 LL | match (&mut em.clone(),) {
468 LL | (&mut Either::One(_t),) => (),
470 LL | (&mut Either::Two(_t),) => (),
473 note: move occurs because these variables have types that don't implement the `Copy` trait
474 --> $DIR/simple.rs:280:27
476 LL | (&mut Either::One(_t),) => (),
478 LL | (&mut Either::Two(_t),) => (),
481 error[E0507]: cannot move out of a shared reference
482 --> $DIR/simple.rs:288:18
484 LL | let &X(_t) = &x;
488 | | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
489 | help: consider removing the `&`: `X(_t)`
491 error[E0507]: cannot move out of a shared reference
492 --> $DIR/simple.rs:292:31
494 LL | if let &Either::One(_t) = &e { }
495 | ---------------- ^^
498 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
499 | help: consider removing the `&`: `Either::One(_t)`
501 error[E0507]: cannot move out of a shared reference
502 --> $DIR/simple.rs:296:34
504 LL | while let &Either::One(_t) = &e { }
505 | ---------------- ^^
508 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
509 | help: consider removing the `&`: `Either::One(_t)`
511 error[E0507]: cannot move out of a shared reference
512 --> $DIR/simple.rs:300:11
517 LL | &Either::One(_t)
521 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
522 | help: consider removing the `&`: `Either::One(_t)`
524 error[E0507]: cannot move out of a shared reference
525 --> $DIR/simple.rs:308:11
530 LL | &Either::One(_t) => (),
534 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
535 | help: consider removing the `&`: `Either::One(_t)`
537 error[E0507]: cannot move out of a shared reference
538 --> $DIR/simple.rs:315:11
543 LL | &Either::One(_t) => (),
547 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
548 | help: consider removing the `&`: `Either::One(_t)`
550 error[E0507]: cannot move out of a mutable reference
551 --> $DIR/simple.rs:323:22
553 LL | let &mut X(_t) = &mut xm;
557 | | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
558 | help: consider removing the `&mut`: `X(_t)`
560 error[E0507]: cannot move out of a mutable reference
561 --> $DIR/simple.rs:327:35
563 LL | if let &mut Either::One(_t) = &mut em { }
564 | -------------------- ^^^^^^^
567 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
568 | help: consider removing the `&mut`: `Either::One(_t)`
570 error[E0507]: cannot move out of a mutable reference
571 --> $DIR/simple.rs:331:38
573 LL | while let &mut Either::One(_t) = &mut em { }
574 | -------------------- ^^^^^^^
577 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
578 | help: consider removing the `&mut`: `Either::One(_t)`
580 error[E0507]: cannot move out of a mutable reference
581 --> $DIR/simple.rs:335:11
586 LL | &mut Either::One(_t)
587 | --------------------
590 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
591 | help: consider removing the `&mut`: `Either::One(_t)`
593 error[E0507]: cannot move out of a mutable reference
594 --> $DIR/simple.rs:343:11
599 LL | &mut Either::One(_t) => (),
600 | --------------------
603 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
604 | help: consider removing the `&mut`: `Either::One(_t)`
606 error[E0507]: cannot move out of a mutable reference
607 --> $DIR/simple.rs:350:11
612 LL | &mut Either::One(_t) => (),
613 | --------------------
616 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
617 | help: consider removing the `&mut`: `Either::One(_t)`
619 error[E0507]: cannot move out of a mutable reference
620 --> $DIR/simple.rs:357:11
625 LL | &mut Either::One(_t) => (),
626 | --------------------
629 | | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
630 | help: consider removing the `&mut`: `Either::One(_t)`
632 error[E0507]: cannot move out of a shared reference
633 --> $DIR/simple.rs:202:11
635 LL | fn f1(&X(_t): &X) { }
639 | | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
640 | help: consider removing the `&`: `X(_t)`
642 error[E0507]: cannot move out of a mutable reference
643 --> $DIR/simple.rs:249:11
645 LL | fn f2(&mut X(_t): &mut X) { }
649 | | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
650 | help: consider removing the `&mut`: `X(_t)`
652 error[E0507]: cannot move out of a shared reference
653 --> $DIR/simple.rs:269:11
655 LL | fn f3((&X(_t),): (&X,)) { }
659 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
661 error[E0507]: cannot move out of a mutable reference
662 --> $DIR/simple.rs:283:11
664 LL | fn f4((&mut X(_t),): (&mut X,)) { }
668 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
670 error: aborting due to 60 previous errors
672 For more information about this error, try `rustc --explain E0507`.