1 error[E0507]: cannot move out of borrowed content
2 --> $DIR/dont-suggest-ref.rs:50:17
7 | | cannot move out of borrowed content
8 | | help: consider removing the `*`: `s`
11 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
12 --> $DIR/dont-suggest-ref.rs:50:11
17 error[E0507]: cannot move out of borrowed content
18 --> $DIR/dont-suggest-ref.rs:54:30
20 LL | if let Either::One(_t) = *r { }
23 | | cannot move out of borrowed content
24 | | help: consider removing the `*`: `r`
27 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
28 --> $DIR/dont-suggest-ref.rs:54:24
30 LL | if let Either::One(_t) = *r { }
33 error[E0507]: cannot move out of borrowed content
34 --> $DIR/dont-suggest-ref.rs:58:33
36 LL | while let Either::One(_t) = *r { }
39 | | cannot move out of borrowed content
40 | | help: consider removing the `*`: `r`
43 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
44 --> $DIR/dont-suggest-ref.rs:58:27
46 LL | while let Either::One(_t) = *r { }
49 error[E0507]: cannot move out of borrowed content
50 --> $DIR/dont-suggest-ref.rs:62:11
55 | cannot move out of borrowed content
56 | help: consider removing the `*`: `r`
61 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
62 --> $DIR/dont-suggest-ref.rs:66:21
67 error[E0507]: cannot move out of borrowed content
68 --> $DIR/dont-suggest-ref.rs:69:11
73 | cannot move out of borrowed content
74 | help: consider removing the `*`: `r`
76 LL | Either::One(_t) => (),
79 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
80 --> $DIR/dont-suggest-ref.rs:73:21
82 LL | Either::One(_t) => (),
85 error[E0507]: cannot move out of borrowed content
86 --> $DIR/dont-suggest-ref.rs:78:17
91 | | cannot move out of borrowed content
92 | | help: consider removing the `*`: `sm`
95 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
96 --> $DIR/dont-suggest-ref.rs:78:11
101 error[E0507]: cannot move out of borrowed content
102 --> $DIR/dont-suggest-ref.rs:82:30
104 LL | if let Either::One(_t) = *rm { }
107 | | cannot move out of borrowed content
108 | | help: consider removing the `*`: `rm`
111 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
112 --> $DIR/dont-suggest-ref.rs:82:24
114 LL | if let Either::One(_t) = *rm { }
117 error[E0507]: cannot move out of borrowed content
118 --> $DIR/dont-suggest-ref.rs:86:33
120 LL | while let Either::One(_t) = *rm { }
123 | | cannot move out of borrowed content
124 | | help: consider removing the `*`: `rm`
127 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
128 --> $DIR/dont-suggest-ref.rs:86:27
130 LL | while let Either::One(_t) = *rm { }
133 error[E0507]: cannot move out of borrowed content
134 --> $DIR/dont-suggest-ref.rs:90:11
139 | cannot move out of borrowed content
140 | help: consider removing the `*`: `rm`
145 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
146 --> $DIR/dont-suggest-ref.rs:94:21
151 error[E0507]: cannot move out of borrowed content
152 --> $DIR/dont-suggest-ref.rs:97:11
157 | cannot move out of borrowed content
158 | help: consider removing the `*`: `rm`
160 LL | Either::One(_t) => (),
163 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
164 --> $DIR/dont-suggest-ref.rs:101:21
166 LL | Either::One(_t) => (),
169 error[E0507]: cannot move out of borrowed content
170 --> $DIR/dont-suggest-ref.rs:105:11
175 | cannot move out of borrowed content
176 | help: consider removing the `*`: `rm`
178 LL | Either::One(_t) => (),
181 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
182 --> $DIR/dont-suggest-ref.rs:109:21
184 LL | Either::One(_t) => (),
187 error[E0507]: cannot move out of borrowed content
188 --> $DIR/dont-suggest-ref.rs:114:17
190 LL | let X(_t) = vs[0];
193 | | cannot move out of borrowed content
194 | | help: consider borrowing here: `&vs[0]`
197 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
198 --> $DIR/dont-suggest-ref.rs:114:11
200 LL | let X(_t) = vs[0];
203 error[E0507]: cannot move out of borrowed content
204 --> $DIR/dont-suggest-ref.rs:118:30
206 LL | if let Either::One(_t) = vr[0] { }
209 | | cannot move out of borrowed content
210 | | help: consider borrowing here: `&vr[0]`
213 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
214 --> $DIR/dont-suggest-ref.rs:118:24
216 LL | if let Either::One(_t) = vr[0] { }
219 error[E0507]: cannot move out of borrowed content
220 --> $DIR/dont-suggest-ref.rs:122:33
222 LL | while let Either::One(_t) = vr[0] { }
225 | | cannot move out of borrowed content
226 | | help: consider borrowing here: `&vr[0]`
229 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
230 --> $DIR/dont-suggest-ref.rs:122:27
232 LL | while let Either::One(_t) = vr[0] { }
235 error[E0507]: cannot move out of borrowed content
236 --> $DIR/dont-suggest-ref.rs:126:11
241 | cannot move out of borrowed content
242 | help: consider borrowing here: `&vr[0]`
247 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
248 --> $DIR/dont-suggest-ref.rs:130:21
253 error[E0507]: cannot move out of borrowed content
254 --> $DIR/dont-suggest-ref.rs:133:11
259 | cannot move out of borrowed content
260 | help: consider borrowing here: `&vr[0]`
262 LL | Either::One(_t) => (),
265 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
266 --> $DIR/dont-suggest-ref.rs:137:21
268 LL | Either::One(_t) => (),
271 error[E0507]: cannot move out of borrowed content
272 --> $DIR/dont-suggest-ref.rs:142:17
274 LL | let X(_t) = vsm[0];
277 | | cannot move out of borrowed content
278 | | help: consider borrowing here: `&vsm[0]`
281 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
282 --> $DIR/dont-suggest-ref.rs:142:11
284 LL | let X(_t) = vsm[0];
287 error[E0507]: cannot move out of borrowed content
288 --> $DIR/dont-suggest-ref.rs:146:30
290 LL | if let Either::One(_t) = vrm[0] { }
293 | | cannot move out of borrowed content
294 | | help: consider borrowing here: `&vrm[0]`
297 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
298 --> $DIR/dont-suggest-ref.rs:146:24
300 LL | if let Either::One(_t) = vrm[0] { }
303 error[E0507]: cannot move out of borrowed content
304 --> $DIR/dont-suggest-ref.rs:150:33
306 LL | while let Either::One(_t) = vrm[0] { }
309 | | cannot move out of borrowed content
310 | | help: consider borrowing here: `&vrm[0]`
313 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
314 --> $DIR/dont-suggest-ref.rs:150:27
316 LL | while let Either::One(_t) = vrm[0] { }
319 error[E0507]: cannot move out of borrowed content
320 --> $DIR/dont-suggest-ref.rs:154:11
325 | cannot move out of borrowed content
326 | help: consider borrowing here: `&vrm[0]`
331 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
332 --> $DIR/dont-suggest-ref.rs:158:21
337 error[E0507]: cannot move out of borrowed content
338 --> $DIR/dont-suggest-ref.rs:161:11
343 | cannot move out of borrowed content
344 | help: consider borrowing here: `&vrm[0]`
346 LL | Either::One(_t) => (),
349 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
350 --> $DIR/dont-suggest-ref.rs:165:21
352 LL | Either::One(_t) => (),
355 error[E0507]: cannot move out of borrowed content
356 --> $DIR/dont-suggest-ref.rs:169:11
361 | cannot move out of borrowed content
362 | help: consider borrowing here: `&vrm[0]`
364 LL | Either::One(_t) => (),
367 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
368 --> $DIR/dont-suggest-ref.rs:173:21
370 LL | Either::One(_t) => (),
373 error[E0507]: cannot move out of borrowed content
374 --> $DIR/dont-suggest-ref.rs:180:18
377 | ------ ^ cannot move out of borrowed content
380 | help: consider removing the `&`: `X(_t)`
382 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
383 --> $DIR/dont-suggest-ref.rs:180:12
388 error[E0507]: cannot move out of borrowed content
389 --> $DIR/dont-suggest-ref.rs:184:31
391 LL | if let &Either::One(_t) = r { }
392 | ---------------- ^ cannot move out of borrowed content
395 | help: consider removing the `&`: `Either::One(_t)`
397 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
398 --> $DIR/dont-suggest-ref.rs:184:25
400 LL | if let &Either::One(_t) = r { }
403 error[E0507]: cannot move out of borrowed content
404 --> $DIR/dont-suggest-ref.rs:188:34
406 LL | while let &Either::One(_t) = r { }
407 | ---------------- ^ cannot move out of borrowed content
410 | help: consider removing the `&`: `Either::One(_t)`
412 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
413 --> $DIR/dont-suggest-ref.rs:188:28
415 LL | while let &Either::One(_t) = r { }
418 error[E0507]: cannot move out of borrowed content
419 --> $DIR/dont-suggest-ref.rs:192:11
422 | ^ cannot move out of borrowed content
423 LL | //~^ ERROR cannot move
424 LL | &Either::One(_t)
428 | help: consider removing the `&`: `Either::One(_t)`
430 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
431 --> $DIR/dont-suggest-ref.rs:194:22
433 LL | &Either::One(_t)
436 error[E0507]: cannot move out of borrowed content
437 --> $DIR/dont-suggest-ref.rs:200:11
440 | ^ cannot move out of borrowed content
441 LL | //~^ ERROR cannot move
442 LL | &Either::One(_t) => (),
446 | help: consider removing the `&`: `Either::One(_t)`
448 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
449 --> $DIR/dont-suggest-ref.rs:202:22
451 LL | &Either::One(_t) => (),
454 error[E0507]: cannot move out of borrowed content
455 --> $DIR/dont-suggest-ref.rs:207:11
458 | ^ cannot move out of borrowed content
459 LL | //~^ ERROR cannot move
460 LL | &Either::One(_t) => (),
464 | help: consider removing the `&`: `Either::One(_t)`
466 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
467 --> $DIR/dont-suggest-ref.rs:209:22
469 LL | &Either::One(_t) => (),
472 error[E0507]: cannot move out of borrowed content
473 --> $DIR/dont-suggest-ref.rs:219:22
475 LL | let &mut X(_t) = sm;
476 | ---------- ^^ cannot move out of borrowed content
479 | help: consider removing the `&mut`: `X(_t)`
481 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
482 --> $DIR/dont-suggest-ref.rs:219:16
484 LL | let &mut X(_t) = sm;
487 error[E0507]: cannot move out of borrowed content
488 --> $DIR/dont-suggest-ref.rs:223:35
490 LL | if let &mut Either::One(_t) = rm { }
491 | -------------------- ^^ cannot move out of borrowed content
494 | help: consider removing the `&mut`: `Either::One(_t)`
496 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
497 --> $DIR/dont-suggest-ref.rs:223:29
499 LL | if let &mut Either::One(_t) = rm { }
502 error[E0507]: cannot move out of borrowed content
503 --> $DIR/dont-suggest-ref.rs:227:38
505 LL | while let &mut Either::One(_t) = rm { }
506 | -------------------- ^^ cannot move out of borrowed content
509 | help: consider removing the `&mut`: `Either::One(_t)`
511 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
512 --> $DIR/dont-suggest-ref.rs:227:32
514 LL | while let &mut Either::One(_t) = rm { }
517 error[E0507]: cannot move out of borrowed content
518 --> $DIR/dont-suggest-ref.rs:231:11
521 | ^^ cannot move out of borrowed content
522 LL | //~^ ERROR cannot move
523 LL | &mut Either::One(_t) => (),
526 LL | &mut Either::Two(_t) => (),
529 note: move occurs because these variables have types that don't implement the `Copy` trait
530 --> $DIR/dont-suggest-ref.rs:233:26
532 LL | &mut Either::One(_t) => (),
535 LL | &mut Either::Two(_t) => (),
537 help: consider removing the `&mut`
539 LL | Either::One(_t) => (),
541 help: consider removing the `&mut`
543 LL | Either::Two(_t) => (),
546 error[E0507]: cannot move out of borrowed content
547 --> $DIR/dont-suggest-ref.rs:240:11
550 | ^^ cannot move out of borrowed content
551 LL | //~^ ERROR cannot move
552 LL | &mut Either::One(_t) => (),
553 | --------------------
556 | help: consider removing the `&mut`: `Either::One(_t)`
558 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
559 --> $DIR/dont-suggest-ref.rs:242:26
561 LL | &mut Either::One(_t) => (),
564 error[E0507]: cannot move out of borrowed content
565 --> $DIR/dont-suggest-ref.rs:247:11
568 | ^^ cannot move out of borrowed content
569 LL | //~^ ERROR cannot move
570 LL | &mut Either::One(_t) => (),
571 | --------------------
574 | help: consider removing the `&mut`: `Either::One(_t)`
576 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
577 --> $DIR/dont-suggest-ref.rs:249:26
579 LL | &mut Either::One(_t) => (),
582 error[E0507]: cannot move out of borrowed content
583 --> $DIR/dont-suggest-ref.rs:254:11
586 | ^^ cannot move out of borrowed content
587 LL | //~^ ERROR cannot move
588 LL | &mut Either::One(_t) => (),
589 | --------------------
592 | help: consider removing the `&mut`: `Either::One(_t)`
594 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
595 --> $DIR/dont-suggest-ref.rs:256:26
597 LL | &mut Either::One(_t) => (),
600 error[E0507]: cannot move out of borrowed content
601 --> $DIR/dont-suggest-ref.rs:268:21
603 LL | let (&X(_t),) = (&x.clone(),);
604 | -- ^^^^^^^^^^^^^ cannot move out of borrowed content
608 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
609 --> $DIR/dont-suggest-ref.rs:268:13
611 LL | let (&X(_t),) = (&x.clone(),);
614 error[E0507]: cannot move out of borrowed content
615 --> $DIR/dont-suggest-ref.rs:270:34
617 LL | if let (&Either::One(_t),) = (&e.clone(),) { }
618 | -- ^^^^^^^^^^^^^ cannot move out of borrowed content
622 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
623 --> $DIR/dont-suggest-ref.rs:270:26
625 LL | if let (&Either::One(_t),) = (&e.clone(),) { }
628 error[E0507]: cannot move out of borrowed content
629 --> $DIR/dont-suggest-ref.rs:272:37
631 LL | while let (&Either::One(_t),) = (&e.clone(),) { }
632 | -- ^^^^^^^^^^^^^ cannot move out of borrowed content
636 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
637 --> $DIR/dont-suggest-ref.rs:272:29
639 LL | while let (&Either::One(_t),) = (&e.clone(),) { }
642 error[E0507]: cannot move out of borrowed content
643 --> $DIR/dont-suggest-ref.rs:274:11
645 LL | match (&e.clone(),) {
646 | ^^^^^^^^^^^^^ cannot move out of borrowed content
647 LL | //~^ ERROR cannot move
648 LL | (&Either::One(_t),)
651 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
652 --> $DIR/dont-suggest-ref.rs:276:23
654 LL | (&Either::One(_t),)
657 error[E0507]: cannot move out of borrowed content
658 --> $DIR/dont-suggest-ref.rs:282:25
660 LL | let (&mut X(_t),) = (&mut xm.clone(),);
661 | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
665 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
666 --> $DIR/dont-suggest-ref.rs:282:17
668 LL | let (&mut X(_t),) = (&mut xm.clone(),);
671 error[E0507]: cannot move out of borrowed content
672 --> $DIR/dont-suggest-ref.rs:284:38
674 LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
675 | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
679 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
680 --> $DIR/dont-suggest-ref.rs:284:30
682 LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
685 error[E0507]: cannot move out of borrowed content
686 --> $DIR/dont-suggest-ref.rs:286:41
688 LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
689 | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
693 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
694 --> $DIR/dont-suggest-ref.rs:286:33
696 LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
699 error[E0507]: cannot move out of borrowed content
700 --> $DIR/dont-suggest-ref.rs:288:11
702 LL | match (&mut em.clone(),) {
703 | ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
704 LL | //~^ ERROR cannot move
705 LL | (&mut Either::One(_t),) => (),
707 LL | (&mut Either::Two(_t),) => (),
710 note: move occurs because these variables have types that don't implement the `Copy` trait
711 --> $DIR/dont-suggest-ref.rs:290:27
713 LL | (&mut Either::One(_t),) => (),
715 LL | (&mut Either::Two(_t),) => (),
718 error[E0507]: cannot move out of borrowed content
719 --> $DIR/dont-suggest-ref.rs:298:18
721 LL | let &X(_t) = &x;
722 | ------ ^^ cannot move out of borrowed content
725 | help: consider removing the `&`: `X(_t)`
727 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
728 --> $DIR/dont-suggest-ref.rs:298:12
730 LL | let &X(_t) = &x;
733 error[E0507]: cannot move out of borrowed content
734 --> $DIR/dont-suggest-ref.rs:302:31
736 LL | if let &Either::One(_t) = &e { }
737 | ---------------- ^^ cannot move out of borrowed content
740 | help: consider removing the `&`: `Either::One(_t)`
742 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
743 --> $DIR/dont-suggest-ref.rs:302:25
745 LL | if let &Either::One(_t) = &e { }
748 error[E0507]: cannot move out of borrowed content
749 --> $DIR/dont-suggest-ref.rs:306:34
751 LL | while let &Either::One(_t) = &e { }
752 | ---------------- ^^ cannot move out of borrowed content
755 | help: consider removing the `&`: `Either::One(_t)`
757 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
758 --> $DIR/dont-suggest-ref.rs:306:28
760 LL | while let &Either::One(_t) = &e { }
763 error[E0507]: cannot move out of borrowed content
764 --> $DIR/dont-suggest-ref.rs:310:11
767 | ^^ cannot move out of borrowed content
768 LL | //~^ ERROR cannot move
769 LL | &Either::One(_t)
773 | help: consider removing the `&`: `Either::One(_t)`
775 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
776 --> $DIR/dont-suggest-ref.rs:312:22
778 LL | &Either::One(_t)
781 error[E0507]: cannot move out of borrowed content
782 --> $DIR/dont-suggest-ref.rs:318:11
785 | ^^ cannot move out of borrowed content
786 LL | //~^ ERROR cannot move
787 LL | &Either::One(_t) => (),
791 | help: consider removing the `&`: `Either::One(_t)`
793 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
794 --> $DIR/dont-suggest-ref.rs:320:22
796 LL | &Either::One(_t) => (),
799 error[E0507]: cannot move out of borrowed content
800 --> $DIR/dont-suggest-ref.rs:325:11
803 | ^^ cannot move out of borrowed content
804 LL | //~^ ERROR cannot move
805 LL | &Either::One(_t) => (),
809 | help: consider removing the `&`: `Either::One(_t)`
811 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
812 --> $DIR/dont-suggest-ref.rs:327:22
814 LL | &Either::One(_t) => (),
817 error[E0507]: cannot move out of borrowed content
818 --> $DIR/dont-suggest-ref.rs:333:22
820 LL | let &mut X(_t) = &mut xm;
821 | ---------- ^^^^^^^ cannot move out of borrowed content
824 | help: consider removing the `&mut`: `X(_t)`
826 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
827 --> $DIR/dont-suggest-ref.rs:333:16
829 LL | let &mut X(_t) = &mut xm;
832 error[E0507]: cannot move out of borrowed content
833 --> $DIR/dont-suggest-ref.rs:337:35
835 LL | if let &mut Either::One(_t) = &mut em { }
836 | -------------------- ^^^^^^^ cannot move out of borrowed content
839 | help: consider removing the `&mut`: `Either::One(_t)`
841 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
842 --> $DIR/dont-suggest-ref.rs:337:29
844 LL | if let &mut Either::One(_t) = &mut em { }
847 error[E0507]: cannot move out of borrowed content
848 --> $DIR/dont-suggest-ref.rs:341:38
850 LL | while let &mut Either::One(_t) = &mut em { }
851 | -------------------- ^^^^^^^ cannot move out of borrowed content
854 | help: consider removing the `&mut`: `Either::One(_t)`
856 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
857 --> $DIR/dont-suggest-ref.rs:341:32
859 LL | while let &mut Either::One(_t) = &mut em { }
862 error[E0507]: cannot move out of borrowed content
863 --> $DIR/dont-suggest-ref.rs:345:11
866 | ^^^^^^^ cannot move out of borrowed content
867 LL | //~^ ERROR cannot move
868 LL | &mut Either::One(_t)
869 | --------------------
872 | help: consider removing the `&mut`: `Either::One(_t)`
874 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
875 --> $DIR/dont-suggest-ref.rs:347:26
877 LL | &mut Either::One(_t)
880 error[E0507]: cannot move out of borrowed content
881 --> $DIR/dont-suggest-ref.rs:353:11
884 | ^^^^^^^ cannot move out of borrowed content
885 LL | //~^ ERROR cannot move
886 LL | &mut Either::One(_t) => (),
887 | --------------------
890 | help: consider removing the `&mut`: `Either::One(_t)`
892 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
893 --> $DIR/dont-suggest-ref.rs:355:26
895 LL | &mut Either::One(_t) => (),
898 error[E0507]: cannot move out of borrowed content
899 --> $DIR/dont-suggest-ref.rs:360:11
902 | ^^^^^^^ cannot move out of borrowed content
903 LL | //~^ ERROR cannot move
904 LL | &mut Either::One(_t) => (),
905 | --------------------
908 | help: consider removing the `&mut`: `Either::One(_t)`
910 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
911 --> $DIR/dont-suggest-ref.rs:362:26
913 LL | &mut Either::One(_t) => (),
916 error[E0507]: cannot move out of borrowed content
917 --> $DIR/dont-suggest-ref.rs:367:11
920 | ^^^^^^^ cannot move out of borrowed content
921 LL | //~^ ERROR cannot move
922 LL | &mut Either::One(_t) => (),
923 | --------------------
926 | help: consider removing the `&mut`: `Either::One(_t)`
928 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
929 --> $DIR/dont-suggest-ref.rs:369:26
931 LL | &mut Either::One(_t) => (),
934 error[E0507]: cannot move out of borrowed content
935 --> $DIR/dont-suggest-ref.rs:377:27
937 LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone());
938 | --------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
942 | help: consider removing the `&`: `(X(_t), X(_u))`
944 note: move occurs because these variables have types that don't implement the `Copy` trait
945 --> $DIR/dont-suggest-ref.rs:377:13
947 LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone());
950 error[E0507]: cannot move out of borrowed content
951 --> $DIR/dont-suggest-ref.rs:381:50
953 LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
954 | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
958 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
960 note: move occurs because these variables have types that don't implement the `Copy` trait
961 --> $DIR/dont-suggest-ref.rs:381:26
963 LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
966 error[E0507]: cannot move out of borrowed content
967 --> $DIR/dont-suggest-ref.rs:385:53
969 LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
970 | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
974 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
976 note: move occurs because these variables have types that don't implement the `Copy` trait
977 --> $DIR/dont-suggest-ref.rs:385:29
979 LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
982 error[E0507]: cannot move out of borrowed content
983 --> $DIR/dont-suggest-ref.rs:389:11
985 LL | match &(e.clone(), e.clone()) {
986 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
987 LL | //~^ ERROR cannot move
988 LL | &(Either::One(_t), Either::Two(_u)) => (),
993 LL | &(Either::Two(_t), Either::One(_u)) => (),
994 | -- ...and here -- ...and here
996 note: move occurs because these variables have types that don't implement the `Copy` trait
997 --> $DIR/dont-suggest-ref.rs:391:23
999 LL | &(Either::One(_t), Either::Two(_u)) => (),
1002 LL | &(Either::Two(_t), Either::One(_u)) => (),
1004 help: consider removing the `&`
1006 LL | (Either::One(_t), Either::Two(_u)) => (),
1007 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1008 help: consider removing the `&`
1010 LL | (Either::Two(_t), Either::One(_u)) => (),
1011 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1013 error[E0507]: cannot move out of borrowed content
1014 --> $DIR/dont-suggest-ref.rs:399:11
1016 LL | match &(e.clone(), e.clone()) {
1017 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1018 LL | //~^ ERROR cannot move
1019 LL | &(Either::One(_t), Either::Two(_u))
1020 | -----------------------------------
1024 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
1026 note: move occurs because these variables have types that don't implement the `Copy` trait
1027 --> $DIR/dont-suggest-ref.rs:401:23
1029 LL | &(Either::One(_t), Either::Two(_u))
1032 error[E0507]: cannot move out of borrowed content
1033 --> $DIR/dont-suggest-ref.rs:408:11
1035 LL | match &(e.clone(), e.clone()) {
1036 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1037 LL | //~^ ERROR cannot move
1038 LL | &(Either::One(_t), Either::Two(_u)) => (),
1039 | -----------------------------------
1043 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
1045 note: move occurs because these variables have types that don't implement the `Copy` trait
1046 --> $DIR/dont-suggest-ref.rs:410:23
1048 LL | &(Either::One(_t), Either::Two(_u)) => (),
1051 error[E0507]: cannot move out of borrowed content
1052 --> $DIR/dont-suggest-ref.rs:416:11
1054 LL | match &(e.clone(), e.clone()) {
1055 | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1056 LL | //~^ ERROR cannot move
1057 LL | &(Either::One(_t), Either::Two(_u)) => (),
1058 | -----------------------------------
1062 | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
1064 note: move occurs because these variables have types that don't implement the `Copy` trait
1065 --> $DIR/dont-suggest-ref.rs:418:23
1067 LL | &(Either::One(_t), Either::Two(_u)) => (),
1070 error[E0507]: cannot move out of borrowed content
1071 --> $DIR/dont-suggest-ref.rs:429:31
1073 LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
1074 | ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1078 | help: consider removing the `&mut`: `(X(_t), X(_u))`
1080 note: move occurs because these variables have types that don't implement the `Copy` trait
1081 --> $DIR/dont-suggest-ref.rs:429:17
1083 LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
1086 error[E0507]: cannot move out of borrowed content
1087 --> $DIR/dont-suggest-ref.rs:433:54
1089 LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
1090 | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1094 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
1096 note: move occurs because these variables have types that don't implement the `Copy` trait
1097 --> $DIR/dont-suggest-ref.rs:433:30
1099 LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
1102 error[E0507]: cannot move out of borrowed content
1103 --> $DIR/dont-suggest-ref.rs:437:57
1105 LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
1106 | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1110 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
1112 note: move occurs because these variables have types that don't implement the `Copy` trait
1113 --> $DIR/dont-suggest-ref.rs:437:33
1115 LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
1118 error[E0507]: cannot move out of borrowed content
1119 --> $DIR/dont-suggest-ref.rs:441:11
1121 LL | match &mut (em.clone(), em.clone()) {
1122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1123 LL | //~^ ERROR cannot move
1124 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1129 LL | &mut (Either::Two(_t), Either::One(_u)) => (),
1130 | -- ...and here -- ...and here
1132 note: move occurs because these variables have types that don't implement the `Copy` trait
1133 --> $DIR/dont-suggest-ref.rs:443:27
1135 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1138 LL | &mut (Either::Two(_t), Either::One(_u)) => (),
1140 help: consider removing the `&mut`
1142 LL | (Either::One(_t), Either::Two(_u)) => (),
1143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1144 help: consider removing the `&mut`
1146 LL | (Either::Two(_t), Either::One(_u)) => (),
1147 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1149 error[E0507]: cannot move out of borrowed content
1150 --> $DIR/dont-suggest-ref.rs:451:11
1152 LL | match &mut (em.clone(), em.clone()) {
1153 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1154 LL | //~^ ERROR cannot move
1155 LL | &mut (Either::One(_t), Either::Two(_u))
1156 | ---------------------------------------
1160 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
1162 note: move occurs because these variables have types that don't implement the `Copy` trait
1163 --> $DIR/dont-suggest-ref.rs:453:27
1165 LL | &mut (Either::One(_t), Either::Two(_u))
1168 error[E0507]: cannot move out of borrowed content
1169 --> $DIR/dont-suggest-ref.rs:460:11
1171 LL | match &mut (em.clone(), em.clone()) {
1172 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1173 LL | //~^ ERROR cannot move
1174 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1175 | ---------------------------------------
1179 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
1181 note: move occurs because these variables have types that don't implement the `Copy` trait
1182 --> $DIR/dont-suggest-ref.rs:462:27
1184 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1187 error[E0507]: cannot move out of borrowed content
1188 --> $DIR/dont-suggest-ref.rs:468:11
1190 LL | match &mut (em.clone(), em.clone()) {
1191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1192 LL | //~^ ERROR cannot move
1193 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1194 | ---------------------------------------
1198 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
1200 note: move occurs because these variables have types that don't implement the `Copy` trait
1201 --> $DIR/dont-suggest-ref.rs:470:27
1203 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1206 error[E0507]: cannot move out of borrowed content
1207 --> $DIR/dont-suggest-ref.rs:476:11
1209 LL | match &mut (em.clone(), em.clone()) {
1210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
1211 LL | //~^ ERROR cannot move
1212 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1213 | ---------------------------------------
1217 | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
1219 note: move occurs because these variables have types that don't implement the `Copy` trait
1220 --> $DIR/dont-suggest-ref.rs:478:27
1222 LL | &mut (Either::One(_t), Either::Two(_u)) => (),
1225 error[E0507]: cannot move out of borrowed content
1226 --> $DIR/dont-suggest-ref.rs:214:11
1228 LL | fn f1(&X(_t): &X) { }
1232 | cannot move out of borrowed content
1233 | help: consider removing the `&`: `X(_t)`
1235 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
1236 --> $DIR/dont-suggest-ref.rs:214:14
1238 LL | fn f1(&X(_t): &X) { }
1241 error[E0507]: cannot move out of borrowed content
1242 --> $DIR/dont-suggest-ref.rs:261:11
1244 LL | fn f2(&mut X(_t): &mut X) { }
1248 | cannot move out of borrowed content
1249 | help: consider removing the `&mut`: `X(_t)`
1251 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
1252 --> $DIR/dont-suggest-ref.rs:261:18
1254 LL | fn f2(&mut X(_t): &mut X) { }
1257 error[E0507]: cannot move out of borrowed content
1258 --> $DIR/dont-suggest-ref.rs:279:11
1260 LL | fn f3((&X(_t),): (&X,)) { }
1264 | cannot move out of borrowed content
1266 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
1267 --> $DIR/dont-suggest-ref.rs:279:15
1269 LL | fn f3((&X(_t),): (&X,)) { }
1272 error[E0507]: cannot move out of borrowed content
1273 --> $DIR/dont-suggest-ref.rs:293:11
1275 LL | fn f4((&mut X(_t),): (&mut X,)) { }
1279 | cannot move out of borrowed content
1281 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
1282 --> $DIR/dont-suggest-ref.rs:293:19
1284 LL | fn f4((&mut X(_t),): (&mut X,)) { }
1287 error[E0507]: cannot move out of borrowed content
1288 --> $DIR/dont-suggest-ref.rs:424:11
1290 LL | fn f5(&(X(_t), X(_u)): &(X, X)) { }
1295 | cannot move out of borrowed content
1296 | help: consider removing the `&`: `(X(_t), X(_u))`
1298 note: move occurs because these variables have types that don't implement the `Copy` trait
1299 --> $DIR/dont-suggest-ref.rs:424:15
1301 LL | fn f5(&(X(_t), X(_u)): &(X, X)) { }
1304 error[E0507]: cannot move out of borrowed content
1305 --> $DIR/dont-suggest-ref.rs:484:11
1307 LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
1308 | ^^^^^^^^--^^^^^--^^
1312 | cannot move out of borrowed content
1313 | help: consider removing the `&mut`: `(X(_t), X(_u))`
1315 note: move occurs because these variables have types that don't implement the `Copy` trait
1316 --> $DIR/dont-suggest-ref.rs:484:19
1318 LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
1321 error: aborting due to 77 previous errors
1323 For more information about this error, try `rustc --explain E0507`.