fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
30.1 KiB985 linesraw
1error[E0507]: cannot move out of `s` which is behind a shared reference
2  --> $DIR/simple.rs:38:17
3   |
4LL |     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   |
10help: consider removing the dereference here
11   |
12LL -     let X(_t) = *s;
13LL +     let X(_t) = s;
14   |
15
16error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
17  --> $DIR/simple.rs:41:30
18   |
19LL |     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   |
25help: consider removing the dereference here
26   |
27LL -     if let Either::One(_t) = *r { }
28LL +     if let Either::One(_t) = r { }
29   |
30
31error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
32  --> $DIR/simple.rs:44:33
33   |
34LL |     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   |
40help: consider removing the dereference here
41   |
42LL -     while let Either::One(_t) = *r { }
43LL +     while let Either::One(_t) = r { }
44   |
45
46error[E0507]: cannot move out of `r` as enum variant `Two` which is behind a shared reference
47  --> $DIR/simple.rs:47:11
48   |
49LL |     match *r {
50   |           ^^
51...
52LL |         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   |
58help: consider removing the dereference here
59   |
60LL -     match *r {
61LL +     match r {
62   |
63
64error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
65  --> $DIR/simple.rs:53:11
66   |
67LL |     match *r {
68   |           ^^
69...
70LL |         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   |
76help: consider removing the dereference here
77   |
78LL -     match *r {
79LL +     match r {
80   |
81
82error[E0507]: cannot move out of `sm` which is behind a mutable reference
83  --> $DIR/simple.rs:61:17
84   |
85LL |     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   |
91help: consider removing the dereference here
92   |
93LL -     let X(_t) = *sm;
94LL +     let X(_t) = sm;
95   |
96
97error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
98  --> $DIR/simple.rs:64:30
99   |
100LL |     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   |
106help: consider removing the dereference here
107   |
108LL -     if let Either::One(_t) = *rm { }
109LL +     if let Either::One(_t) = rm { }
110   |
111
112error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
113  --> $DIR/simple.rs:67:33
114   |
115LL |     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   |
121help: consider removing the dereference here
122   |
123LL -     while let Either::One(_t) = *rm { }
124LL +     while let Either::One(_t) = rm { }
125   |
126
127error[E0507]: cannot move out of `rm` as enum variant `Two` which is behind a mutable reference
128  --> $DIR/simple.rs:70:11
129   |
130LL |     match *rm {
131   |           ^^^
132...
133LL |         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   |
139help: consider removing the dereference here
140   |
141LL -     match *rm {
142LL +     match rm {
143   |
144
145error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
146  --> $DIR/simple.rs:76:11
147   |
148LL |     match *rm {
149   |           ^^^
150...
151LL |         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   |
157help: consider removing the dereference here
158   |
159LL -     match *rm {
160LL +     match rm {
161   |
162
163error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
164  --> $DIR/simple.rs:83:11
165   |
166LL |     match *rm {
167   |           ^^^
168...
169LL |         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   |
175help: consider removing the dereference here
176   |
177LL -     match *rm {
178LL +     match rm {
179   |
180
181error[E0507]: cannot move out of index of `Vec<X>`
182  --> $DIR/simple.rs:91:17
183   |
184LL |     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   |
190help: consider borrowing here
191   |
192LL |     let X(_t) = &vs[0];
193   |                 +
194
195error[E0507]: cannot move out of index of `Vec<Either>`
196  --> $DIR/simple.rs:94:30
197   |
198LL |     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   |
204help: consider borrowing here
205   |
206LL |     if let Either::One(_t) = &vr[0] { }
207   |                              +
208
209error[E0507]: cannot move out of index of `Vec<Either>`
210  --> $DIR/simple.rs:97:33
211   |
212LL |     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   |
218help: consider borrowing here
219   |
220LL |     while let Either::One(_t) = &vr[0] { }
221   |                                 +
222
223error[E0507]: cannot move out of index of `Vec<Either>`
224  --> $DIR/simple.rs:100:11
225   |
226LL |     match vr[0] {
227   |           ^^^^^
228...
229LL |         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   |
235help: consider borrowing here
236   |
237LL |     match &vr[0] {
238   |           +
239
240error[E0507]: cannot move out of index of `Vec<Either>`
241  --> $DIR/simple.rs:106:11
242   |
243LL |     match vr[0] {
244   |           ^^^^^
245...
246LL |         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   |
252help: consider borrowing here
253   |
254LL |     match &vr[0] {
255   |           +
256
257error[E0507]: cannot move out of index of `Vec<X>`
258  --> $DIR/simple.rs:114:17
259   |
260LL |     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   |
266help: consider borrowing here
267   |
268LL |     let X(_t) = &vsm[0];
269   |                 +
270
271error[E0507]: cannot move out of index of `Vec<Either>`
272  --> $DIR/simple.rs:117:30
273   |
274LL |     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   |
280help: consider borrowing here
281   |
282LL |     if let Either::One(_t) = &vrm[0] { }
283   |                              +
284
285error[E0507]: cannot move out of index of `Vec<Either>`
286  --> $DIR/simple.rs:120:33
287   |
288LL |     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   |
294help: consider borrowing here
295   |
296LL |     while let Either::One(_t) = &vrm[0] { }
297   |                                 +
298
299error[E0507]: cannot move out of index of `Vec<Either>`
300  --> $DIR/simple.rs:123:11
301   |
302LL |     match vrm[0] {
303   |           ^^^^^^
304...
305LL |         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   |
311help: consider borrowing here
312   |
313LL |     match &vrm[0] {
314   |           +
315
316error[E0507]: cannot move out of index of `Vec<Either>`
317  --> $DIR/simple.rs:129:11
318   |
319LL |     match vrm[0] {
320   |           ^^^^^^
321...
322LL |         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   |
328help: consider borrowing here
329   |
330LL |     match &vrm[0] {
331   |           +
332
333error[E0507]: cannot move out of index of `Vec<Either>`
334  --> $DIR/simple.rs:136:11
335   |
336LL |     match vrm[0] {
337   |           ^^^^^^
338...
339LL |         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   |
345help: consider borrowing here
346   |
347LL |     match &vrm[0] {
348   |           +
349
350error[E0507]: cannot move out of `s` which is behind a shared reference
351  --> $DIR/simple.rs:146:18
352   |
353LL |     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   |
359help: consider removing the borrow
360   |
361LL -     let &X(_t) = s;
362LL +     let X(_t) = s;
363   |
364
365error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
366  --> $DIR/simple.rs:149:31
367   |
368LL |     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   |
374help: consider removing the borrow
375   |
376LL -     if let &Either::One(_t) = r { }
377LL +     if let Either::One(_t) = r { }
378   |
379
380error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
381  --> $DIR/simple.rs:152:34
382   |
383LL |     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   |
389help: consider removing the borrow
390   |
391LL -     while let &Either::One(_t) = r { }
392LL +     while let Either::One(_t) = r { }
393   |
394
395error[E0507]: cannot move out of `r` as enum variant `Two` which is behind a shared reference
396  --> $DIR/simple.rs:155:11
397   |
398LL |     match r {
399   |           ^
400LL |
401LL |         &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   |
407help: consider removing the borrow
408   |
409LL -         &Either::One(_t)
410LL +         Either::One(_t)
411   |
412
413error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
414  --> $DIR/simple.rs:162:11
415   |
416LL |     match r {
417   |           ^
418LL |
419LL |         &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   |
425help: consider removing the borrow
426   |
427LL -         &Either::One(_t) => (),
428LL +         Either::One(_t) => (),
429   |
430
431error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
432  --> $DIR/simple.rs:168:11
433   |
434LL |     match r {
435   |           ^
436LL |
437LL |         &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   |
443help: consider removing the borrow
444   |
445LL -         &Either::One(_t) => (),
446LL +         Either::One(_t) => (),
447   |
448
449error[E0507]: cannot move out of `sm` which is behind a mutable reference
450  --> $DIR/simple.rs:178:22
451   |
452LL |     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   |
458help: consider removing the mutable borrow
459   |
460LL -     let &mut X(_t) = sm;
461LL +     let X(_t) = sm;
462   |
463
464error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
465  --> $DIR/simple.rs:181:35
466   |
467LL |     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   |
473help: consider removing the mutable borrow
474   |
475LL -     if let &mut Either::One(_t) = rm { }
476LL +     if let Either::One(_t) = rm { }
477   |
478
479error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
480  --> $DIR/simple.rs:184:38
481   |
482LL |     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   |
488help: consider removing the mutable borrow
489   |
490LL -     while let &mut Either::One(_t) = rm { }
491LL +     while let Either::One(_t) = rm { }
492   |
493
494error[E0507]: cannot move out of `rm` as enum variant `Two` which is behind a mutable reference
495  --> $DIR/simple.rs:187:11
496   |
497LL |     match rm {
498   |           ^^
499LL |
500LL |         &mut Either::One(_t) => (),
501   |                          -- data moved here
502LL |
503LL |         &mut Either::Two(_t) => (),
504   |                          -- ...and here
505   |
506   = note: move occurs because these variables have types that don't implement the `Copy` trait
507help: consider removing the mutable borrow
508   |
509LL -         &mut Either::One(_t) => (),
510LL +         Either::One(_t) => (),
511   |
512help: consider removing the mutable borrow
513   |
514LL -         &mut Either::Two(_t) => (),
515LL +         Either::Two(_t) => (),
516   |
517
518error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
519  --> $DIR/simple.rs:194:11
520   |
521LL |     match rm {
522   |           ^^
523LL |
524LL |         &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   |
530help: consider removing the mutable borrow
531   |
532LL -         &mut Either::One(_t) => (),
533LL +         Either::One(_t) => (),
534   |
535
536error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
537  --> $DIR/simple.rs:200:11
538   |
539LL |     match rm {
540   |           ^^
541LL |
542LL |         &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   |
548help: consider removing the mutable borrow
549   |
550LL -         &mut Either::One(_t) => (),
551LL +         Either::One(_t) => (),
552   |
553
554error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
555  --> $DIR/simple.rs:206:11
556   |
557LL |     match rm {
558   |           ^^
559LL |
560LL |         &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   |
566help: consider removing the mutable borrow
567   |
568LL -         &mut Either::One(_t) => (),
569LL +         Either::One(_t) => (),
570   |
571
572error[E0507]: cannot move out of a shared reference
573  --> $DIR/simple.rs:220:21
574   |
575LL |     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   |
581help: consider borrowing the pattern binding
582   |
583LL |     let (&X(ref _t),) = (&x.clone(),);
584   |             +++
585
586error[E0507]: cannot move out of a shared reference
587  --> $DIR/simple.rs:223:34
588   |
589LL |     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   |
595help: consider borrowing the pattern binding
596   |
597LL |     if let (&Either::One(ref _t),) = (&e.clone(),) { }
598   |                          +++
599
600error[E0507]: cannot move out of a shared reference
601  --> $DIR/simple.rs:226:37
602   |
603LL |     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   |
609help: consider borrowing the pattern binding
610   |
611LL |     while let (&Either::One(ref _t),) = (&e.clone(),) { }
612   |                             +++
613
614error[E0507]: cannot move out of a shared reference
615  --> $DIR/simple.rs:229:11
616   |
617LL |     match (&e.clone(),) {
618   |           ^^^^^^^^^^^^^
619LL |
620LL |         (&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   |
626help: consider borrowing the pattern binding
627   |
628LL |         (&Either::One(ref _t),)
629   |                       +++
630
631error[E0507]: cannot move out of a mutable reference
632  --> $DIR/simple.rs:239:25
633   |
634LL |     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   |
640help: consider borrowing the pattern binding
641   |
642LL |     let (&mut X(ref _t),) = (&mut xm.clone(),);
643   |                 +++
644
645error[E0507]: cannot move out of a mutable reference
646  --> $DIR/simple.rs:242:38
647   |
648LL |     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   |
654help: consider borrowing the pattern binding
655   |
656LL |     if let (&mut Either::One(ref _t),) = (&mut em.clone(),) { }
657   |                              +++
658
659error[E0507]: cannot move out of a mutable reference
660  --> $DIR/simple.rs:245:41
661   |
662LL |     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   |
668help: consider borrowing the pattern binding
669   |
670LL |     while let (&mut Either::One(ref _t),) = (&mut em.clone(),) { }
671   |                                 +++
672
673error[E0507]: cannot move out of a mutable reference
674  --> $DIR/simple.rs:248:11
675   |
676LL |     match (&mut em.clone(),) {
677   |           ^^^^^^^^^^^^^^^^^^
678LL |
679LL |         (&mut Either::One(_t),) => (),
680   |                           -- data moved here
681LL |
682LL |         (&mut Either::Two(_t),) => (),
683   |                           -- ...and here
684   |
685   = note: move occurs because these variables have types that don't implement the `Copy` trait
686help: consider borrowing the pattern binding
687   |
688LL |         (&mut Either::One(ref _t),) => (),
689   |                           +++
690help: consider borrowing the pattern binding
691   |
692LL |         (&mut Either::Two(ref _t),) => (),
693   |                           +++
694
695error[E0507]: cannot move out of a shared reference
696  --> $DIR/simple.rs:261:18
697   |
698LL |     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   |
704help: consider removing the borrow
705   |
706LL -     let &X(_t) = &x;
707LL +     let X(_t) = &x;
708   |
709
710error[E0507]: cannot move out of a shared reference
711  --> $DIR/simple.rs:264:31
712   |
713LL |     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   |
719help: consider removing the borrow
720   |
721LL -     if let &Either::One(_t) = &e { }
722LL +     if let Either::One(_t) = &e { }
723   |
724
725error[E0507]: cannot move out of a shared reference
726  --> $DIR/simple.rs:267:34
727   |
728LL |     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   |
734help: consider removing the borrow
735   |
736LL -     while let &Either::One(_t) = &e { }
737LL +     while let Either::One(_t) = &e { }
738   |
739
740error[E0507]: cannot move out of a shared reference
741  --> $DIR/simple.rs:270:11
742   |
743LL |     match &e {
744   |           ^^
745LL |
746LL |         &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   |
752help: consider removing the borrow
753   |
754LL -         &Either::One(_t)
755LL +         Either::One(_t)
756   |
757
758error[E0507]: cannot move out of a shared reference
759  --> $DIR/simple.rs:277:11
760   |
761LL |     match &e {
762   |           ^^
763LL |
764LL |         &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   |
770help: consider removing the borrow
771   |
772LL -         &Either::One(_t) => (),
773LL +         Either::One(_t) => (),
774   |
775
776error[E0507]: cannot move out of a shared reference
777  --> $DIR/simple.rs:283:11
778   |
779LL |     match &e {
780   |           ^^
781LL |
782LL |         &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   |
788help: consider removing the borrow
789   |
790LL -         &Either::One(_t) => (),
791LL +         Either::One(_t) => (),
792   |
793
794error[E0507]: cannot move out of a mutable reference
795  --> $DIR/simple.rs:290:22
796   |
797LL |     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   |
803help: consider removing the mutable borrow
804   |
805LL -     let &mut X(_t) = &mut xm;
806LL +     let X(_t) = &mut xm;
807   |
808
809error[E0507]: cannot move out of a mutable reference
810  --> $DIR/simple.rs:293:35
811   |
812LL |     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   |
818help: consider removing the mutable borrow
819   |
820LL -     if let &mut Either::One(_t) = &mut em { }
821LL +     if let Either::One(_t) = &mut em { }
822   |
823
824error[E0507]: cannot move out of a mutable reference
825  --> $DIR/simple.rs:296:38
826   |
827LL |     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   |
833help: consider removing the mutable borrow
834   |
835LL -     while let &mut Either::One(_t) = &mut em { }
836LL +     while let Either::One(_t) = &mut em { }
837   |
838
839error[E0507]: cannot move out of a mutable reference
840  --> $DIR/simple.rs:299:11
841   |
842LL |     match &mut em {
843   |           ^^^^^^^
844LL |
845LL |         &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   |
851help: consider removing the mutable borrow
852   |
853LL -         &mut Either::One(_t)
854LL +         Either::One(_t)
855   |
856
857error[E0507]: cannot move out of a mutable reference
858  --> $DIR/simple.rs:306:11
859   |
860LL |     match &mut em {
861   |           ^^^^^^^
862LL |
863LL |         &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   |
869help: consider removing the mutable borrow
870   |
871LL -         &mut Either::One(_t) => (),
872LL +         Either::One(_t) => (),
873   |
874
875error[E0507]: cannot move out of a mutable reference
876  --> $DIR/simple.rs:312:11
877   |
878LL |     match &mut em {
879   |           ^^^^^^^
880LL |
881LL |         &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   |
887help: consider removing the mutable borrow
888   |
889LL -         &mut Either::One(_t) => (),
890LL +         Either::One(_t) => (),
891   |
892
893error[E0507]: cannot move out of a mutable reference
894  --> $DIR/simple.rs:318:11
895   |
896LL |     match &mut em {
897   |           ^^^^^^^
898LL |
899LL |         &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   |
905help: consider removing the mutable borrow
906   |
907LL -         &mut Either::One(_t) => (),
908LL +         Either::One(_t) => (),
909   |
910
911error[E0507]: cannot move out of a shared reference
912  --> $DIR/simple.rs:174:11
913   |
914LL |     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   |
920help: consider removing the borrow
921   |
922LL -     fn f1(&X(_t): &X) { }
923LL +     fn f1(X(_t): &X) { }
924   |
925
926error[E0507]: cannot move out of a mutable reference
927  --> $DIR/simple.rs:212:11
928   |
929LL |     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   |
935help: consider removing the mutable borrow
936   |
937LL -     fn f2(&mut X(_t): &mut X) { }
938LL +     fn f2(X(_t): &mut X) { }
939   |
940
941error[E0507]: cannot move out of a shared reference
942  --> $DIR/simple.rs:235:11
943   |
944LL |     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   |
950help: consider borrowing the pattern binding
951   |
952LL |     fn f3((&X(ref _t),): (&X,)) { }
953   |               +++
954
955error[E0507]: cannot move out of a mutable reference
956  --> $DIR/simple.rs:255:11
957   |
958LL |     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   |
964help: consider borrowing the pattern binding
965   |
966LL |     fn f4((&mut X(ref _t),): (&mut X,)) { }
967   |                   +++
968
969error[E0507]: cannot move out of `a.a` as enum variant `Some` which is behind a shared reference
970  --> $DIR/simple.rs:331:20
971   |
972LL |     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   |
978help: consider borrowing the pattern binding
979   |
980LL |     let Some(ref _s) = a.a else {
981   |              +++
982
983error: aborting due to 61 previous errors
984
985For more information about this error, try `rustc --explain E0507`.