]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / suggestions / dont-suggest-ref / duplicate-suggestions.stderr
1 error[E0507]: cannot move out of a shared reference
2   --> $DIR/duplicate-suggestions.rs:39:27
3    |
4 LL |     let &(X(_t), X(_u)) = &(x.clone(), x.clone());
5    |         ---------------   ^^^^^^^^^^^^^^^^^^^^^^^
6    |         |   |      |
7    |         |   |      ...and here
8    |         |   data moved here
9    |         help: consider removing the `&`: `(X(_t), X(_u))`
10    |
11 note: move occurs because these variables have types that don't implement the `Copy` trait
12   --> $DIR/duplicate-suggestions.rs:39:13
13    |
14 LL |     let &(X(_t), X(_u)) = &(x.clone(), x.clone());
15    |             ^^     ^^
16
17 error[E0507]: cannot move out of a shared reference
18   --> $DIR/duplicate-suggestions.rs:43:50
19    |
20 LL |     if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
21    |            -----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^
22    |            |             |                |
23    |            |             |                ...and here
24    |            |             data moved here
25    |            help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
26    |
27 note: move occurs because these variables have types that don't implement the `Copy` trait
28   --> $DIR/duplicate-suggestions.rs:43:26
29    |
30 LL |     if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
31    |                          ^^               ^^
32
33 error[E0507]: cannot move out of a shared reference
34   --> $DIR/duplicate-suggestions.rs:47:53
35    |
36 LL |     while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
37    |               -----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^
38    |               |             |                |
39    |               |             |                ...and here
40    |               |             data moved here
41    |               help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
42    |
43 note: move occurs because these variables have types that don't implement the `Copy` trait
44   --> $DIR/duplicate-suggestions.rs:47:29
45    |
46 LL |     while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
47    |                             ^^               ^^
48
49 error[E0507]: cannot move out of a shared reference
50   --> $DIR/duplicate-suggestions.rs:51:11
51    |
52 LL |     match &(e.clone(), e.clone()) {
53    |           ^^^^^^^^^^^^^^^^^^^^^^^
54 LL |
55 LL |         &(Either::One(_t), Either::Two(_u)) => (),
56    |                       --               -- ...and here
57    |                       |
58    |                       data moved here
59 ...
60 LL |         &(Either::Two(_t), Either::One(_u)) => (),
61    |                       -- ...and here   -- ...and here
62    |
63 note: move occurs because these variables have types that don't implement the `Copy` trait
64   --> $DIR/duplicate-suggestions.rs:53:23
65    |
66 LL |         &(Either::One(_t), Either::Two(_u)) => (),
67    |                       ^^               ^^
68 ...
69 LL |         &(Either::Two(_t), Either::One(_u)) => (),
70    |                       ^^               ^^
71 help: consider removing the `&`
72    |
73 LL |         (Either::One(_t), Either::Two(_u)) => (),
74    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75 help: consider removing the `&`
76    |
77 LL |         (Either::Two(_t), Either::One(_u)) => (),
78    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
80 error[E0507]: cannot move out of a shared reference
81   --> $DIR/duplicate-suggestions.rs:61:11
82    |
83 LL |     match &(e.clone(), e.clone()) {
84    |           ^^^^^^^^^^^^^^^^^^^^^^^
85 LL |
86 LL |         &(Either::One(_t), Either::Two(_u))
87    |         -----------------------------------
88    |         |             |                |
89    |         |             |                ...and here
90    |         |             data moved here
91    |         help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
92    |
93 note: move occurs because these variables have types that don't implement the `Copy` trait
94   --> $DIR/duplicate-suggestions.rs:63:23
95    |
96 LL |         &(Either::One(_t), Either::Two(_u))
97    |                       ^^               ^^
98
99 error[E0507]: cannot move out of a shared reference
100   --> $DIR/duplicate-suggestions.rs:70:11
101    |
102 LL |     match &(e.clone(), e.clone()) {
103    |           ^^^^^^^^^^^^^^^^^^^^^^^
104 LL |
105 LL |         &(Either::One(_t), Either::Two(_u)) => (),
106    |         -----------------------------------
107    |         |             |                |
108    |         |             |                ...and here
109    |         |             data moved here
110    |         help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
111    |
112 note: move occurs because these variables have types that don't implement the `Copy` trait
113   --> $DIR/duplicate-suggestions.rs:72:23
114    |
115 LL |         &(Either::One(_t), Either::Two(_u)) => (),
116    |                       ^^               ^^
117
118 error[E0507]: cannot move out of a shared reference
119   --> $DIR/duplicate-suggestions.rs:78:11
120    |
121 LL |     match &(e.clone(), e.clone()) {
122    |           ^^^^^^^^^^^^^^^^^^^^^^^
123 LL |
124 LL |         &(Either::One(_t), Either::Two(_u)) => (),
125    |         -----------------------------------
126    |         |             |                |
127    |         |             |                ...and here
128    |         |             data moved here
129    |         help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
130    |
131 note: move occurs because these variables have types that don't implement the `Copy` trait
132   --> $DIR/duplicate-suggestions.rs:80:23
133    |
134 LL |         &(Either::One(_t), Either::Two(_u)) => (),
135    |                       ^^               ^^
136
137 error[E0507]: cannot move out of a mutable reference
138   --> $DIR/duplicate-suggestions.rs:91:31
139    |
140 LL |     let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
141    |         -------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142    |         |       |      |
143    |         |       |      ...and here
144    |         |       data moved here
145    |         help: consider removing the `&mut`: `(X(_t), X(_u))`
146    |
147 note: move occurs because these variables have types that don't implement the `Copy` trait
148   --> $DIR/duplicate-suggestions.rs:91:17
149    |
150 LL |     let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
151    |                 ^^     ^^
152
153 error[E0507]: cannot move out of a mutable reference
154   --> $DIR/duplicate-suggestions.rs:95:54
155    |
156 LL |     if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
157    |            ---------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158    |            |                 |                |
159    |            |                 |                ...and here
160    |            |                 data moved here
161    |            help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
162    |
163 note: move occurs because these variables have types that don't implement the `Copy` trait
164   --> $DIR/duplicate-suggestions.rs:95:30
165    |
166 LL |     if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
167    |                              ^^               ^^
168
169 error[E0507]: cannot move out of a mutable reference
170   --> $DIR/duplicate-suggestions.rs:99:57
171    |
172 LL |     while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
173    |               ---------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174    |               |                 |                |
175    |               |                 |                ...and here
176    |               |                 data moved here
177    |               help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
178    |
179 note: move occurs because these variables have types that don't implement the `Copy` trait
180   --> $DIR/duplicate-suggestions.rs:99:33
181    |
182 LL |     while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
183    |                                 ^^               ^^
184
185 error[E0507]: cannot move out of a mutable reference
186   --> $DIR/duplicate-suggestions.rs:103:11
187    |
188 LL |     match &mut (em.clone(), em.clone()) {
189    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190 LL |
191 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
192    |                           --               -- ...and here
193    |                           |
194    |                           data moved here
195 ...
196 LL |         &mut (Either::Two(_t), Either::One(_u)) => (),
197    |                           -- ...and here   -- ...and here
198    |
199 note: move occurs because these variables have types that don't implement the `Copy` trait
200   --> $DIR/duplicate-suggestions.rs:105:27
201    |
202 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
203    |                           ^^               ^^
204 ...
205 LL |         &mut (Either::Two(_t), Either::One(_u)) => (),
206    |                           ^^               ^^
207 help: consider removing the `&mut`
208    |
209 LL |         (Either::One(_t), Either::Two(_u)) => (),
210    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 help: consider removing the `&mut`
212    |
213 LL |         (Either::Two(_t), Either::One(_u)) => (),
214    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
215
216 error[E0507]: cannot move out of a mutable reference
217   --> $DIR/duplicate-suggestions.rs:113:11
218    |
219 LL |     match &mut (em.clone(), em.clone()) {
220    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221 LL |
222 LL |         &mut (Either::One(_t), Either::Two(_u))
223    |         ---------------------------------------
224    |         |                 |                |
225    |         |                 |                ...and here
226    |         |                 data moved here
227    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
228    |
229 note: move occurs because these variables have types that don't implement the `Copy` trait
230   --> $DIR/duplicate-suggestions.rs:115:27
231    |
232 LL |         &mut (Either::One(_t), Either::Two(_u))
233    |                           ^^               ^^
234
235 error[E0507]: cannot move out of a mutable reference
236   --> $DIR/duplicate-suggestions.rs:122:11
237    |
238 LL |     match &mut (em.clone(), em.clone()) {
239    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 LL |
241 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
242    |         ---------------------------------------
243    |         |                 |                |
244    |         |                 |                ...and here
245    |         |                 data moved here
246    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
247    |
248 note: move occurs because these variables have types that don't implement the `Copy` trait
249   --> $DIR/duplicate-suggestions.rs:124:27
250    |
251 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
252    |                           ^^               ^^
253
254 error[E0507]: cannot move out of a mutable reference
255   --> $DIR/duplicate-suggestions.rs:130:11
256    |
257 LL |     match &mut (em.clone(), em.clone()) {
258    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
259 LL |
260 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
261    |         ---------------------------------------
262    |         |                 |                |
263    |         |                 |                ...and here
264    |         |                 data moved here
265    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
266    |
267 note: move occurs because these variables have types that don't implement the `Copy` trait
268   --> $DIR/duplicate-suggestions.rs:132:27
269    |
270 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
271    |                           ^^               ^^
272
273 error[E0507]: cannot move out of a mutable reference
274   --> $DIR/duplicate-suggestions.rs:138:11
275    |
276 LL |     match &mut (em.clone(), em.clone()) {
277    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 LL |
279 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
280    |         ---------------------------------------
281    |         |                 |                |
282    |         |                 |                ...and here
283    |         |                 data moved here
284    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
285    |
286 note: move occurs because these variables have types that don't implement the `Copy` trait
287   --> $DIR/duplicate-suggestions.rs:140:27
288    |
289 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
290    |                           ^^               ^^
291
292 error[E0507]: cannot move out of a shared reference
293   --> $DIR/duplicate-suggestions.rs:86:11
294    |
295 LL |     fn f5(&(X(_t), X(_u)): &(X, X)) { }
296    |           ^^^^--^^^^^--^^
297    |           |   |      |
298    |           |   |      ...and here
299    |           |   data moved here
300    |           help: consider removing the `&`: `(X(_t), X(_u))`
301    |
302 note: move occurs because these variables have types that don't implement the `Copy` trait
303   --> $DIR/duplicate-suggestions.rs:86:15
304    |
305 LL |     fn f5(&(X(_t), X(_u)): &(X, X)) { }
306    |               ^^     ^^
307
308 error[E0507]: cannot move out of a mutable reference
309   --> $DIR/duplicate-suggestions.rs:146:11
310    |
311 LL |     fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
312    |           ^^^^^^^^--^^^^^--^^
313    |           |       |      |
314    |           |       |      ...and here
315    |           |       data moved here
316    |           help: consider removing the `&mut`: `(X(_t), X(_u))`
317    |
318 note: move occurs because these variables have types that don't implement the `Copy` trait
319   --> $DIR/duplicate-suggestions.rs:146:19
320    |
321 LL |     fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
322    |                   ^^     ^^
323
324 error: aborting due to 17 previous errors
325
326 For more information about this error, try `rustc --explain E0507`.