]> git.proxmox.com Git - rustc.git/blob - tests/ui/suggestions/dont-suggest-ref/simple.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / suggestions / dont-suggest-ref / simple.stderr
1 error[E0507]: cannot move out of `s` which is behind a shared reference
2 --> $DIR/simple.rs:38:17
3 |
4 LL | let X(_t) = *s;
5 | -- ^^
6 | |
7 | data moved here
8 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
9 |
10 help: consider removing the dereference here
11 |
12 LL - let X(_t) = *s;
13 LL + let X(_t) = s;
14 |
15
16 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
17 --> $DIR/simple.rs:41:30
18 |
19 LL | if let Either::One(_t) = *r { }
20 | -- ^^
21 | |
22 | data moved here
23 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
24 |
25 help: consider removing the dereference here
26 |
27 LL - if let Either::One(_t) = *r { }
28 LL + if let Either::One(_t) = r { }
29 |
30
31 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
32 --> $DIR/simple.rs:44:33
33 |
34 LL | while let Either::One(_t) = *r { }
35 | -- ^^
36 | |
37 | data moved here
38 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
39 |
40 help: consider removing the dereference here
41 |
42 LL - while let Either::One(_t) = *r { }
43 LL + while let Either::One(_t) = r { }
44 |
45
46 error[E0507]: cannot move out of `r` as enum variant `Two` which is behind a shared reference
47 --> $DIR/simple.rs:47:11
48 |
49 LL | match *r {
50 | ^^
51 ...
52 LL | Either::One(_t)
53 | --
54 | |
55 | data moved here
56 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
57 |
58 help: consider removing the dereference here
59 |
60 LL - match *r {
61 LL + match r {
62 |
63
64 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
65 --> $DIR/simple.rs:53:11
66 |
67 LL | match *r {
68 | ^^
69 ...
70 LL | Either::One(_t) => (),
71 | --
72 | |
73 | data moved here
74 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
75 |
76 help: consider removing the dereference here
77 |
78 LL - match *r {
79 LL + match r {
80 |
81
82 error[E0507]: cannot move out of `sm` which is behind a mutable reference
83 --> $DIR/simple.rs:61:17
84 |
85 LL | let X(_t) = *sm;
86 | -- ^^^
87 | |
88 | data moved here
89 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
90 |
91 help: consider removing the dereference here
92 |
93 LL - let X(_t) = *sm;
94 LL + let X(_t) = sm;
95 |
96
97 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
98 --> $DIR/simple.rs:64:30
99 |
100 LL | if let Either::One(_t) = *rm { }
101 | -- ^^^
102 | |
103 | data moved here
104 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
105 |
106 help: consider removing the dereference here
107 |
108 LL - if let Either::One(_t) = *rm { }
109 LL + if let Either::One(_t) = rm { }
110 |
111
112 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
113 --> $DIR/simple.rs:67:33
114 |
115 LL | while let Either::One(_t) = *rm { }
116 | -- ^^^
117 | |
118 | data moved here
119 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
120 |
121 help: consider removing the dereference here
122 |
123 LL - while let Either::One(_t) = *rm { }
124 LL + while let Either::One(_t) = rm { }
125 |
126
127 error[E0507]: cannot move out of `rm` as enum variant `Two` which is behind a mutable reference
128 --> $DIR/simple.rs:70:11
129 |
130 LL | match *rm {
131 | ^^^
132 ...
133 LL | Either::One(_t)
134 | --
135 | |
136 | data moved here
137 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
138 |
139 help: consider removing the dereference here
140 |
141 LL - match *rm {
142 LL + match rm {
143 |
144
145 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
146 --> $DIR/simple.rs:76:11
147 |
148 LL | match *rm {
149 | ^^^
150 ...
151 LL | Either::One(_t) => (),
152 | --
153 | |
154 | data moved here
155 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
156 |
157 help: consider removing the dereference here
158 |
159 LL - match *rm {
160 LL + match rm {
161 |
162
163 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
164 --> $DIR/simple.rs:83:11
165 |
166 LL | match *rm {
167 | ^^^
168 ...
169 LL | Either::One(_t) => (),
170 | --
171 | |
172 | data moved here
173 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
174 |
175 help: consider removing the dereference here
176 |
177 LL - match *rm {
178 LL + match rm {
179 |
180
181 error[E0507]: cannot move out of index of `Vec<X>`
182 --> $DIR/simple.rs:91:17
183 |
184 LL | let X(_t) = vs[0];
185 | -- ^^^^^
186 | |
187 | data moved here
188 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
189 |
190 help: consider borrowing here
191 |
192 LL | let X(_t) = &vs[0];
193 | +
194
195 error[E0507]: cannot move out of index of `Vec<Either>`
196 --> $DIR/simple.rs:94:30
197 |
198 LL | if let Either::One(_t) = vr[0] { }
199 | -- ^^^^^
200 | |
201 | data moved here
202 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
203 |
204 help: consider borrowing here
205 |
206 LL | if let Either::One(_t) = &vr[0] { }
207 | +
208
209 error[E0507]: cannot move out of index of `Vec<Either>`
210 --> $DIR/simple.rs:97:33
211 |
212 LL | while let Either::One(_t) = vr[0] { }
213 | -- ^^^^^
214 | |
215 | data moved here
216 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
217 |
218 help: consider borrowing here
219 |
220 LL | while let Either::One(_t) = &vr[0] { }
221 | +
222
223 error[E0507]: cannot move out of index of `Vec<Either>`
224 --> $DIR/simple.rs:100:11
225 |
226 LL | match vr[0] {
227 | ^^^^^
228 ...
229 LL | Either::One(_t)
230 | --
231 | |
232 | data moved here
233 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
234 |
235 help: consider borrowing here
236 |
237 LL | match &vr[0] {
238 | +
239
240 error[E0507]: cannot move out of index of `Vec<Either>`
241 --> $DIR/simple.rs:106:11
242 |
243 LL | match vr[0] {
244 | ^^^^^
245 ...
246 LL | Either::One(_t) => (),
247 | --
248 | |
249 | data moved here
250 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
251 |
252 help: consider borrowing here
253 |
254 LL | match &vr[0] {
255 | +
256
257 error[E0507]: cannot move out of index of `Vec<X>`
258 --> $DIR/simple.rs:114:17
259 |
260 LL | let X(_t) = vsm[0];
261 | -- ^^^^^^
262 | |
263 | data moved here
264 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
265 |
266 help: consider borrowing here
267 |
268 LL | let X(_t) = &vsm[0];
269 | +
270
271 error[E0507]: cannot move out of index of `Vec<Either>`
272 --> $DIR/simple.rs:117:30
273 |
274 LL | if let Either::One(_t) = vrm[0] { }
275 | -- ^^^^^^
276 | |
277 | data moved here
278 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
279 |
280 help: consider borrowing here
281 |
282 LL | if let Either::One(_t) = &vrm[0] { }
283 | +
284
285 error[E0507]: cannot move out of index of `Vec<Either>`
286 --> $DIR/simple.rs:120:33
287 |
288 LL | while let Either::One(_t) = vrm[0] { }
289 | -- ^^^^^^
290 | |
291 | data moved here
292 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
293 |
294 help: consider borrowing here
295 |
296 LL | while let Either::One(_t) = &vrm[0] { }
297 | +
298
299 error[E0507]: cannot move out of index of `Vec<Either>`
300 --> $DIR/simple.rs:123:11
301 |
302 LL | match vrm[0] {
303 | ^^^^^^
304 ...
305 LL | Either::One(_t)
306 | --
307 | |
308 | data moved here
309 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
310 |
311 help: consider borrowing here
312 |
313 LL | match &vrm[0] {
314 | +
315
316 error[E0507]: cannot move out of index of `Vec<Either>`
317 --> $DIR/simple.rs:129:11
318 |
319 LL | match vrm[0] {
320 | ^^^^^^
321 ...
322 LL | Either::One(_t) => (),
323 | --
324 | |
325 | data moved here
326 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
327 |
328 help: consider borrowing here
329 |
330 LL | match &vrm[0] {
331 | +
332
333 error[E0507]: cannot move out of index of `Vec<Either>`
334 --> $DIR/simple.rs:136:11
335 |
336 LL | match vrm[0] {
337 | ^^^^^^
338 ...
339 LL | Either::One(_t) => (),
340 | --
341 | |
342 | data moved here
343 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
344 |
345 help: consider borrowing here
346 |
347 LL | match &vrm[0] {
348 | +
349
350 error[E0507]: cannot move out of `s` which is behind a shared reference
351 --> $DIR/simple.rs:146:18
352 |
353 LL | let &X(_t) = s;
354 | -- ^
355 | |
356 | data moved here
357 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
358 |
359 help: consider removing the borrow
360 |
361 LL - let &X(_t) = s;
362 LL + let X(_t) = s;
363 |
364
365 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
366 --> $DIR/simple.rs:149:31
367 |
368 LL | if let &Either::One(_t) = r { }
369 | -- ^
370 | |
371 | data moved here
372 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
373 |
374 help: consider removing the borrow
375 |
376 LL - if let &Either::One(_t) = r { }
377 LL + if let Either::One(_t) = r { }
378 |
379
380 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
381 --> $DIR/simple.rs:152:34
382 |
383 LL | while let &Either::One(_t) = r { }
384 | -- ^
385 | |
386 | data moved here
387 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
388 |
389 help: consider removing the borrow
390 |
391 LL - while let &Either::One(_t) = r { }
392 LL + while let Either::One(_t) = r { }
393 |
394
395 error[E0507]: cannot move out of `r` as enum variant `Two` which is behind a shared reference
396 --> $DIR/simple.rs:155:11
397 |
398 LL | match r {
399 | ^
400 LL |
401 LL | &Either::One(_t)
402 | --
403 | |
404 | data moved here
405 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
406 |
407 help: consider removing the borrow
408 |
409 LL - &Either::One(_t)
410 LL + Either::One(_t)
411 |
412
413 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
414 --> $DIR/simple.rs:162:11
415 |
416 LL | match r {
417 | ^
418 LL |
419 LL | &Either::One(_t) => (),
420 | --
421 | |
422 | data moved here
423 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
424 |
425 help: consider removing the borrow
426 |
427 LL - &Either::One(_t) => (),
428 LL + Either::One(_t) => (),
429 |
430
431 error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
432 --> $DIR/simple.rs:168:11
433 |
434 LL | match r {
435 | ^
436 LL |
437 LL | &Either::One(_t) => (),
438 | --
439 | |
440 | data moved here
441 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
442 |
443 help: consider removing the borrow
444 |
445 LL - &Either::One(_t) => (),
446 LL + Either::One(_t) => (),
447 |
448
449 error[E0507]: cannot move out of `sm` which is behind a mutable reference
450 --> $DIR/simple.rs:178:22
451 |
452 LL | let &mut X(_t) = sm;
453 | -- ^^
454 | |
455 | data moved here
456 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
457 |
458 help: consider removing the mutable borrow
459 |
460 LL - let &mut X(_t) = sm;
461 LL + let X(_t) = sm;
462 |
463
464 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
465 --> $DIR/simple.rs:181:35
466 |
467 LL | if let &mut Either::One(_t) = rm { }
468 | -- ^^
469 | |
470 | data moved here
471 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
472 |
473 help: consider removing the mutable borrow
474 |
475 LL - if let &mut Either::One(_t) = rm { }
476 LL + if let Either::One(_t) = rm { }
477 |
478
479 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
480 --> $DIR/simple.rs:184:38
481 |
482 LL | while let &mut Either::One(_t) = rm { }
483 | -- ^^
484 | |
485 | data moved here
486 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
487 |
488 help: consider removing the mutable borrow
489 |
490 LL - while let &mut Either::One(_t) = rm { }
491 LL + while let Either::One(_t) = rm { }
492 |
493
494 error[E0507]: cannot move out of `rm` as enum variant `Two` which is behind a mutable reference
495 --> $DIR/simple.rs:187:11
496 |
497 LL | match rm {
498 | ^^
499 LL |
500 LL | &mut Either::One(_t) => (),
501 | -- data moved here
502 LL |
503 LL | &mut Either::Two(_t) => (),
504 | -- ...and here
505 |
506 = note: move occurs because these variables have types that don't implement the `Copy` trait
507 help: consider removing the mutable borrow
508 |
509 LL - &mut Either::One(_t) => (),
510 LL + Either::One(_t) => (),
511 |
512 help: consider removing the mutable borrow
513 |
514 LL - &mut Either::Two(_t) => (),
515 LL + Either::Two(_t) => (),
516 |
517
518 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
519 --> $DIR/simple.rs:194:11
520 |
521 LL | match rm {
522 | ^^
523 LL |
524 LL | &mut Either::One(_t) => (),
525 | --
526 | |
527 | data moved here
528 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
529 |
530 help: consider removing the mutable borrow
531 |
532 LL - &mut Either::One(_t) => (),
533 LL + Either::One(_t) => (),
534 |
535
536 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
537 --> $DIR/simple.rs:200:11
538 |
539 LL | match rm {
540 | ^^
541 LL |
542 LL | &mut Either::One(_t) => (),
543 | --
544 | |
545 | data moved here
546 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
547 |
548 help: consider removing the mutable borrow
549 |
550 LL - &mut Either::One(_t) => (),
551 LL + Either::One(_t) => (),
552 |
553
554 error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
555 --> $DIR/simple.rs:206:11
556 |
557 LL | match rm {
558 | ^^
559 LL |
560 LL | &mut Either::One(_t) => (),
561 | --
562 | |
563 | data moved here
564 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
565 |
566 help: consider removing the mutable borrow
567 |
568 LL - &mut Either::One(_t) => (),
569 LL + Either::One(_t) => (),
570 |
571
572 error[E0507]: cannot move out of a shared reference
573 --> $DIR/simple.rs:220:21
574 |
575 LL | let (&X(_t),) = (&x.clone(),);
576 | -- ^^^^^^^^^^^^^
577 | |
578 | data moved here
579 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
580 |
581 help: consider borrowing the pattern binding
582 |
583 LL | let (&X(ref _t),) = (&x.clone(),);
584 | +++
585
586 error[E0507]: cannot move out of a shared reference
587 --> $DIR/simple.rs:223:34
588 |
589 LL | if let (&Either::One(_t),) = (&e.clone(),) { }
590 | -- ^^^^^^^^^^^^^
591 | |
592 | data moved here
593 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
594 |
595 help: consider borrowing the pattern binding
596 |
597 LL | if let (&Either::One(ref _t),) = (&e.clone(),) { }
598 | +++
599
600 error[E0507]: cannot move out of a shared reference
601 --> $DIR/simple.rs:226:37
602 |
603 LL | while let (&Either::One(_t),) = (&e.clone(),) { }
604 | -- ^^^^^^^^^^^^^
605 | |
606 | data moved here
607 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
608 |
609 help: consider borrowing the pattern binding
610 |
611 LL | while let (&Either::One(ref _t),) = (&e.clone(),) { }
612 | +++
613
614 error[E0507]: cannot move out of a shared reference
615 --> $DIR/simple.rs:229:11
616 |
617 LL | match (&e.clone(),) {
618 | ^^^^^^^^^^^^^
619 LL |
620 LL | (&Either::One(_t),)
621 | --
622 | |
623 | data moved here
624 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
625 |
626 help: consider borrowing the pattern binding
627 |
628 LL | (&Either::One(ref _t),)
629 | +++
630
631 error[E0507]: cannot move out of a mutable reference
632 --> $DIR/simple.rs:239:25
633 |
634 LL | let (&mut X(_t),) = (&mut xm.clone(),);
635 | -- ^^^^^^^^^^^^^^^^^^
636 | |
637 | data moved here
638 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
639 |
640 help: consider borrowing the pattern binding
641 |
642 LL | let (&mut X(ref _t),) = (&mut xm.clone(),);
643 | +++
644
645 error[E0507]: cannot move out of a mutable reference
646 --> $DIR/simple.rs:242:38
647 |
648 LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
649 | -- ^^^^^^^^^^^^^^^^^^
650 | |
651 | data moved here
652 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
653 |
654 help: consider borrowing the pattern binding
655 |
656 LL | if let (&mut Either::One(ref _t),) = (&mut em.clone(),) { }
657 | +++
658
659 error[E0507]: cannot move out of a mutable reference
660 --> $DIR/simple.rs:245:41
661 |
662 LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
663 | -- ^^^^^^^^^^^^^^^^^^
664 | |
665 | data moved here
666 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
667 |
668 help: consider borrowing the pattern binding
669 |
670 LL | while let (&mut Either::One(ref _t),) = (&mut em.clone(),) { }
671 | +++
672
673 error[E0507]: cannot move out of a mutable reference
674 --> $DIR/simple.rs:248:11
675 |
676 LL | match (&mut em.clone(),) {
677 | ^^^^^^^^^^^^^^^^^^
678 LL |
679 LL | (&mut Either::One(_t),) => (),
680 | -- data moved here
681 LL |
682 LL | (&mut Either::Two(_t),) => (),
683 | -- ...and here
684 |
685 = note: move occurs because these variables have types that don't implement the `Copy` trait
686 help: consider borrowing the pattern binding
687 |
688 LL | (&mut Either::One(ref _t),) => (),
689 | +++
690 help: consider borrowing the pattern binding
691 |
692 LL | (&mut Either::Two(ref _t),) => (),
693 | +++
694
695 error[E0507]: cannot move out of a shared reference
696 --> $DIR/simple.rs:261:18
697 |
698 LL | let &X(_t) = &x;
699 | -- ^^
700 | |
701 | data moved here
702 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
703 |
704 help: consider removing the borrow
705 |
706 LL - let &X(_t) = &x;
707 LL + let X(_t) = &x;
708 |
709
710 error[E0507]: cannot move out of a shared reference
711 --> $DIR/simple.rs:264:31
712 |
713 LL | if let &Either::One(_t) = &e { }
714 | -- ^^
715 | |
716 | data moved here
717 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
718 |
719 help: consider removing the borrow
720 |
721 LL - if let &Either::One(_t) = &e { }
722 LL + if let Either::One(_t) = &e { }
723 |
724
725 error[E0507]: cannot move out of a shared reference
726 --> $DIR/simple.rs:267:34
727 |
728 LL | while let &Either::One(_t) = &e { }
729 | -- ^^
730 | |
731 | data moved here
732 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
733 |
734 help: consider removing the borrow
735 |
736 LL - while let &Either::One(_t) = &e { }
737 LL + while let Either::One(_t) = &e { }
738 |
739
740 error[E0507]: cannot move out of a shared reference
741 --> $DIR/simple.rs:270:11
742 |
743 LL | match &e {
744 | ^^
745 LL |
746 LL | &Either::One(_t)
747 | --
748 | |
749 | data moved here
750 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
751 |
752 help: consider removing the borrow
753 |
754 LL - &Either::One(_t)
755 LL + Either::One(_t)
756 |
757
758 error[E0507]: cannot move out of a shared reference
759 --> $DIR/simple.rs:277:11
760 |
761 LL | match &e {
762 | ^^
763 LL |
764 LL | &Either::One(_t) => (),
765 | --
766 | |
767 | data moved here
768 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
769 |
770 help: consider removing the borrow
771 |
772 LL - &Either::One(_t) => (),
773 LL + Either::One(_t) => (),
774 |
775
776 error[E0507]: cannot move out of a shared reference
777 --> $DIR/simple.rs:283:11
778 |
779 LL | match &e {
780 | ^^
781 LL |
782 LL | &Either::One(_t) => (),
783 | --
784 | |
785 | data moved here
786 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
787 |
788 help: consider removing the borrow
789 |
790 LL - &Either::One(_t) => (),
791 LL + Either::One(_t) => (),
792 |
793
794 error[E0507]: cannot move out of a mutable reference
795 --> $DIR/simple.rs:290:22
796 |
797 LL | let &mut X(_t) = &mut xm;
798 | -- ^^^^^^^
799 | |
800 | data moved here
801 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
802 |
803 help: consider removing the mutable borrow
804 |
805 LL - let &mut X(_t) = &mut xm;
806 LL + let X(_t) = &mut xm;
807 |
808
809 error[E0507]: cannot move out of a mutable reference
810 --> $DIR/simple.rs:293:35
811 |
812 LL | if let &mut Either::One(_t) = &mut em { }
813 | -- ^^^^^^^
814 | |
815 | data moved here
816 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
817 |
818 help: consider removing the mutable borrow
819 |
820 LL - if let &mut Either::One(_t) = &mut em { }
821 LL + if let Either::One(_t) = &mut em { }
822 |
823
824 error[E0507]: cannot move out of a mutable reference
825 --> $DIR/simple.rs:296:38
826 |
827 LL | while let &mut Either::One(_t) = &mut em { }
828 | -- ^^^^^^^
829 | |
830 | data moved here
831 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
832 |
833 help: consider removing the mutable borrow
834 |
835 LL - while let &mut Either::One(_t) = &mut em { }
836 LL + while let Either::One(_t) = &mut em { }
837 |
838
839 error[E0507]: cannot move out of a mutable reference
840 --> $DIR/simple.rs:299:11
841 |
842 LL | match &mut em {
843 | ^^^^^^^
844 LL |
845 LL | &mut Either::One(_t)
846 | --
847 | |
848 | data moved here
849 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
850 |
851 help: consider removing the mutable borrow
852 |
853 LL - &mut Either::One(_t)
854 LL + Either::One(_t)
855 |
856
857 error[E0507]: cannot move out of a mutable reference
858 --> $DIR/simple.rs:306:11
859 |
860 LL | match &mut em {
861 | ^^^^^^^
862 LL |
863 LL | &mut Either::One(_t) => (),
864 | --
865 | |
866 | data moved here
867 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
868 |
869 help: consider removing the mutable borrow
870 |
871 LL - &mut Either::One(_t) => (),
872 LL + Either::One(_t) => (),
873 |
874
875 error[E0507]: cannot move out of a mutable reference
876 --> $DIR/simple.rs:312:11
877 |
878 LL | match &mut em {
879 | ^^^^^^^
880 LL |
881 LL | &mut Either::One(_t) => (),
882 | --
883 | |
884 | data moved here
885 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
886 |
887 help: consider removing the mutable borrow
888 |
889 LL - &mut Either::One(_t) => (),
890 LL + Either::One(_t) => (),
891 |
892
893 error[E0507]: cannot move out of a mutable reference
894 --> $DIR/simple.rs:318:11
895 |
896 LL | match &mut em {
897 | ^^^^^^^
898 LL |
899 LL | &mut Either::One(_t) => (),
900 | --
901 | |
902 | data moved here
903 | move occurs because `_t` has type `X`, which does not implement the `Copy` trait
904 |
905 help: consider removing the mutable borrow
906 |
907 LL - &mut Either::One(_t) => (),
908 LL + Either::One(_t) => (),
909 |
910
911 error[E0507]: cannot move out of a shared reference
912 --> $DIR/simple.rs:174:11
913 |
914 LL | fn f1(&X(_t): &X) { }
915 | ^^^--^
916 | |
917 | data moved here
918 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
919 |
920 help: consider removing the borrow
921 |
922 LL - fn f1(&X(_t): &X) { }
923 LL + fn f1(X(_t): &X) { }
924 |
925
926 error[E0507]: cannot move out of a mutable reference
927 --> $DIR/simple.rs:212:11
928 |
929 LL | fn f2(&mut X(_t): &mut X) { }
930 | ^^^^^^^--^
931 | |
932 | data moved here
933 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
934 |
935 help: consider removing the mutable borrow
936 |
937 LL - fn f2(&mut X(_t): &mut X) { }
938 LL + fn f2(X(_t): &mut X) { }
939 |
940
941 error[E0507]: cannot move out of a shared reference
942 --> $DIR/simple.rs:235:11
943 |
944 LL | fn f3((&X(_t),): (&X,)) { }
945 | ^^^^--^^^
946 | |
947 | data moved here
948 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
949 |
950 help: consider borrowing the pattern binding
951 |
952 LL | fn f3((&X(ref _t),): (&X,)) { }
953 | +++
954
955 error[E0507]: cannot move out of a mutable reference
956 --> $DIR/simple.rs:255:11
957 |
958 LL | fn f4((&mut X(_t),): (&mut X,)) { }
959 | ^^^^^^^^--^^^
960 | |
961 | data moved here
962 | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
963 |
964 help: consider borrowing the pattern binding
965 |
966 LL | fn f4((&mut X(ref _t),): (&mut X,)) { }
967 | +++
968
969 error[E0507]: cannot move out of `a.a` as enum variant `Some` which is behind a shared reference
970 --> $DIR/simple.rs:331:20
971 |
972 LL | let Some(_s) = a.a else {
973 | -- ^^^
974 | |
975 | data moved here
976 | move occurs because `_s` has type `String`, which does not implement the `Copy` trait
977 |
978 help: consider borrowing the pattern binding
979 |
980 LL | let Some(ref _s) = a.a else {
981 | +++
982
983 error: aborting due to 61 previous errors
984
985 For more information about this error, try `rustc --explain E0507`.