]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / pattern / bindings-after-at / borrowck-pat-by-move-and-ref-inverse.stderr
1 error: borrow of moved value
2 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:29:9
3 |
4 LL | let a @ ref b = U;
5 | -^^^-----
6 | | |
7 | | value borrowed here after move
8 | value moved into `a` here
9 | move occurs because `a` has type `U` which does not implement the `Copy` trait
10
11 error: borrow of moved value
12 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9
13 |
14 LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
15 | -^^^^^^^^^^^^---------^^^^^^-----^
16 | | | |
17 | | | value borrowed here after move
18 | | value borrowed here after move
19 | value moved into `a` here
20 | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
21
22 error: borrow of moved value
23 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:14
24 |
25 LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
26 | -----^^^---------
27 | | |
28 | | value borrowed here after move
29 | value moved into `b` here
30 | move occurs because `b` has type `U` which does not implement the `Copy` trait
31
32 error: borrow of moved value
33 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:33
34 |
35 LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
36 | -^^^-----
37 | | |
38 | | value borrowed here after move
39 | value moved into `d` here
40 | move occurs because `d` has type `U` which does not implement the `Copy` trait
41
42 error: borrow of moved value
43 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9
44 |
45 LL | let a @ [ref mut b, ref c] = [U, U];
46 | -^^^^---------^^-----^
47 | | | |
48 | | | value borrowed here after move
49 | | value borrowed here after move
50 | value moved into `a` here
51 | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
52
53 error: borrow of moved value
54 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:41:9
55 |
56 LL | let a @ ref b = u();
57 | -^^^-----
58 | | |
59 | | value borrowed here after move
60 | value moved into `a` here
61 | move occurs because `a` has type `U` which does not implement the `Copy` trait
62
63 error: borrow of moved value
64 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:9
65 |
66 LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
67 | -^^^^^^^^^^^^---------^^^^^^-----^
68 | | | |
69 | | | value borrowed here after move
70 | | value borrowed here after move
71 | value moved into `a` here
72 | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
73
74 error: borrow of moved value
75 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:14
76 |
77 LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
78 | -----^^^---------
79 | | |
80 | | value borrowed here after move
81 | value moved into `b` here
82 | move occurs because `b` has type `U` which does not implement the `Copy` trait
83
84 error: borrow of moved value
85 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:33
86 |
87 LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
88 | -^^^-----
89 | | |
90 | | value borrowed here after move
91 | value moved into `d` here
92 | move occurs because `d` has type `U` which does not implement the `Copy` trait
93
94 error: borrow of moved value
95 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:51:9
96 |
97 LL | let a @ [ref mut b, ref c] = [u(), u()];
98 | -^^^^---------^^-----^
99 | | | |
100 | | | value borrowed here after move
101 | | value borrowed here after move
102 | value moved into `a` here
103 | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
104
105 error: borrow of moved value
106 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:56:9
107 |
108 LL | a @ Some(ref b) => {}
109 | -^^^^^^^^-----^
110 | | |
111 | | value borrowed here after move
112 | value moved into `a` here
113 | move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
114
115 error: borrow of moved value
116 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9
117 |
118 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
119 | -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^
120 | | | |
121 | | | value borrowed here after move
122 | | value borrowed here after move
123 | value moved into `a` here
124 | move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
125
126 error: borrow of moved value
127 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:19
128 |
129 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
130 | -----^^^---------
131 | | |
132 | | value borrowed here after move
133 | value moved into `b` here
134 | move occurs because `b` has type `U` which does not implement the `Copy` trait
135
136 error: borrow of moved value
137 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38
138 |
139 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
140 | -^^^-----
141 | | |
142 | | value borrowed here after move
143 | value moved into `d` here
144 | move occurs because `d` has type `U` which does not implement the `Copy` trait
145
146 error: borrow of moved value
147 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:9
148 |
149 LL | mut a @ Some([ref b, ref mut c]) => {}
150 | -----^^^^^^^^^-----^^---------^^
151 | | | |
152 | | | value borrowed here after move
153 | | value borrowed here after move
154 | value moved into `a` here
155 | move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
156
157 error: borrow of moved value
158 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:9
159 |
160 LL | a @ Some(ref b) => {}
161 | -^^^^^^^^-----^
162 | | |
163 | | value borrowed here after move
164 | value moved into `a` here
165 | move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
166
167 error: borrow of moved value
168 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:9
169 |
170 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
171 | -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^
172 | | | |
173 | | | value borrowed here after move
174 | | value borrowed here after move
175 | value moved into `a` here
176 | move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
177
178 error: borrow of moved value
179 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:19
180 |
181 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
182 | -----^^^---------
183 | | |
184 | | value borrowed here after move
185 | value moved into `b` here
186 | move occurs because `b` has type `U` which does not implement the `Copy` trait
187
188 error: borrow of moved value
189 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38
190 |
191 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
192 | -^^^-----
193 | | |
194 | | value borrowed here after move
195 | value moved into `d` here
196 | move occurs because `d` has type `U` which does not implement the `Copy` trait
197
198 error: borrow of moved value
199 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:9
200 |
201 LL | mut a @ Some([ref b, ref mut c]) => {}
202 | -----^^^^^^^^^-----^^---------^^
203 | | | |
204 | | | value borrowed here after move
205 | | value borrowed here after move
206 | value moved into `a` here
207 | move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
208
209 error: borrow of moved value
210 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
211 |
212 LL | fn f1(a @ ref b: U) {}
213 | -^^^-----
214 | | |
215 | | value borrowed here after move
216 | value moved into `a` here
217 | move occurs because `a` has type `U` which does not implement the `Copy` trait
218
219 error: borrow of moved value
220 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:11
221 |
222 LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
223 | -----^^^^^^^^-----^^^^^^^^^^-----^
224 | | | |
225 | | | value borrowed here after move
226 | | value borrowed here after move
227 | value moved into `a` here
228 | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
229
230 error: borrow of moved value
231 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:20
232 |
233 LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
234 | -^^^-----
235 | | |
236 | | value borrowed here after move
237 | value moved into `b` here
238 | move occurs because `b` has type `U` which does not implement the `Copy` trait
239
240 error: borrow of moved value
241 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:31
242 |
243 LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
244 | -----^^^-----
245 | | |
246 | | value borrowed here after move
247 | value moved into `d` here
248 | move occurs because `d` has type `U` which does not implement the `Copy` trait
249
250 error: borrow of moved value
251 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:25:11
252 |
253 LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
254 | -^^^^---------^^-----^
255 | | | |
256 | | | value borrowed here after move
257 | | value borrowed here after move
258 | value moved into `a` here
259 | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
260
261 error[E0382]: borrow of moved value
262 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:22
263 |
264 LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
265 | --------^^^^^^^^^
266 | | |
267 | | value borrowed here after move
268 | value moved here
269 |
270 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
271
272 error[E0382]: use of moved value
273 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:33
274 |
275 LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
276 | ------------------------^^^^^^^^^- ------ move occurs because value has type `(U, U)`, which does not implement the `Copy` trait
277 | | |
278 | | value used here after move
279 | value moved here
280
281 error[E0382]: borrow of moved value
282 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:37
283 |
284 LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
285 | ----^^^^^
286 | | |
287 | | value borrowed here after move
288 | value moved here
289 |
290 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
291
292 error[E0382]: borrow of moved value
293 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:25
294 |
295 LL | let a @ [ref mut b, ref c] = [U, U];
296 | ----------------^^^^^- ------ move occurs because value has type `[U; 2]`, which does not implement the `Copy` trait
297 | | |
298 | | value borrowed here after move
299 | value moved here
300
301 error[E0382]: borrow of moved value
302 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:41:13
303 |
304 LL | let a @ ref b = u();
305 | ----^^^^^ --- move occurs because value has type `U`, which does not implement the `Copy` trait
306 | | |
307 | | value borrowed here after move
308 | value moved here
309
310 error[E0382]: borrow of moved value
311 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:22
312 |
313 LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
314 | --------^^^^^^^^^
315 | | |
316 | | value borrowed here after move
317 | value moved here
318 |
319 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
320
321 error[E0382]: use of moved value
322 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:33
323 |
324 LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
325 | ------------------------^^^^^^^^^- ---------- move occurs because value has type `(U, U)`, which does not implement the `Copy` trait
326 | | |
327 | | value used here after move
328 | value moved here
329
330 error[E0382]: borrow of moved value
331 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:37
332 |
333 LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
334 | ----^^^^^
335 | | |
336 | | value borrowed here after move
337 | value moved here
338 |
339 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
340
341 error[E0382]: borrow of moved value
342 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:51:25
343 |
344 LL | let a @ [ref mut b, ref c] = [u(), u()];
345 | ----------------^^^^^- ---------- move occurs because value has type `[U; 2]`, which does not implement the `Copy` trait
346 | | |
347 | | value borrowed here after move
348 | value moved here
349
350 error[E0382]: borrow of moved value
351 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:27
352 |
353 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
354 | --------^^^^^^^^^
355 | | |
356 | | value borrowed here after move
357 | value moved here
358 |
359 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
360 help: borrow this field in the pattern to avoid moving the value
361 |
362 LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
363 | ^^^
364
365 error[E0382]: use of moved value
366 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38
367 |
368 LL | match Some((U, U)) {
369 | ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
370 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
371 | -----------------------------^^^^^^^^^--
372 | | |
373 | | value used here after move
374 | value moved here
375
376 error[E0382]: borrow of moved value
377 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:42
378 |
379 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
380 | ----^^^^^
381 | | |
382 | | value borrowed here after move
383 | value moved here
384 |
385 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
386 help: borrow this field in the pattern to avoid moving the value
387 |
388 LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
389 | ^^^
390
391 error[E0382]: borrow of moved value
392 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:30
393 |
394 LL | match Some([U, U]) {
395 | ------------ move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait
396 LL | mut a @ Some([ref b, ref mut c]) => {}
397 | ---------------------^^^^^^^^^--
398 | | |
399 | | value borrowed here after move
400 | value moved here
401
402 error[E0382]: borrow of moved value
403 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:18
404 |
405 LL | match Some(u()) {
406 | --------- move occurs because value has type `Option<U>`, which does not implement the `Copy` trait
407 LL | a @ Some(ref b) => {}
408 | ---------^^^^^-
409 | | |
410 | | value borrowed here after move
411 | value moved here
412
413 error[E0382]: borrow of moved value
414 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:27
415 |
416 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
417 | --------^^^^^^^^^
418 | | |
419 | | value borrowed here after move
420 | value moved here
421 |
422 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
423 help: borrow this field in the pattern to avoid moving the value
424 |
425 LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
426 | ^^^
427
428 error[E0382]: use of moved value
429 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38
430 |
431 LL | match Some((u(), u())) {
432 | ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
433 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
434 | -----------------------------^^^^^^^^^--
435 | | |
436 | | value used here after move
437 | value moved here
438
439 error[E0382]: borrow of moved value
440 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:42
441 |
442 LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
443 | ----^^^^^
444 | | |
445 | | value borrowed here after move
446 | value moved here
447 |
448 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
449 help: borrow this field in the pattern to avoid moving the value
450 |
451 LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
452 | ^^^
453
454 error[E0382]: borrow of moved value
455 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:30
456 |
457 LL | match Some([u(), u()]) {
458 | ---------------- move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait
459 LL | mut a @ Some([ref b, ref mut c]) => {}
460 | ---------------------^^^^^^^^^--
461 | | |
462 | | value borrowed here after move
463 | value moved here
464
465 error[E0382]: borrow of moved value
466 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:15
467 |
468 LL | fn f1(a @ ref b: U) {}
469 | ----^^^^^
470 | | |
471 | | value borrowed here after move
472 | value moved here
473 | move occurs because value has type `U`, which does not implement the `Copy` trait
474
475 error[E0382]: borrow of moved value
476 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:24
477 |
478 LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
479 | ----^^^^^
480 | | |
481 | | value borrowed here after move
482 | value moved here
483 |
484 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
485
486 error[E0382]: use of moved value
487 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:31
488 |
489 LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
490 | --------------------^^^^^^^^^^^^^-
491 | | |
492 | | value used here after move
493 | value moved here
494 | move occurs because value has type `(U, U)`, which does not implement the `Copy` trait
495
496 error[E0382]: borrow of moved value
497 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:39
498 |
499 LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
500 | --------^^^^^
501 | | |
502 | | value borrowed here after move
503 | value moved here
504 |
505 = note: move occurs because value has type `U`, which does not implement the `Copy` trait
506
507 error[E0382]: borrow of moved value
508 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:25:27
509 |
510 LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
511 | ----------------^^^^^-
512 | | |
513 | | value borrowed here after move
514 | value moved here
515 | move occurs because value has type `[U; 2]`, which does not implement the `Copy` trait
516
517 error: aborting due to 48 previous errors
518
519 For more information about this error, try `rustc --explain E0382`.