@@ -215,7 +215,7 @@ LL | ref mut a @ Some([ref b, ref mut c]) => {}
215
215
| +++
216
216
217
217
error: borrow of moved value
218
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61 :9
218
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:60 :9
219
219
|
220
220
LL | a @ Some(ref b) => {}
221
221
| ^ ----- value borrowed here after move
@@ -229,7 +229,7 @@ LL | ref a @ Some(ref b) => {}
229
229
| +++
230
230
231
231
error: borrow of moved value
232
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67 :9
232
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:65 :9
233
233
|
234
234
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
235
235
| ^ --------- ----- value borrowed here after move
@@ -244,7 +244,7 @@ LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
244
244
| +++
245
245
246
246
error: borrow of moved value
247
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67 :19
247
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:65 :19
248
248
|
249
249
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
250
250
| ^^^^^ --------- value borrowed here after move
@@ -258,7 +258,7 @@ LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
258
258
| +++
259
259
260
260
error: borrow of moved value
261
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67 :38
261
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:65 :38
262
262
|
263
263
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
264
264
| ^ ----- value borrowed here after move
@@ -272,7 +272,7 @@ LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
272
272
| +++
273
273
274
274
error: borrow of moved value
275
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75 :9
275
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:73 :9
276
276
|
277
277
LL | mut a @ Some([ref b, ref mut c]) => {}
278
278
| ^^^^^ ----- --------- value borrowed here after move
@@ -314,66 +314,33 @@ help: borrow this binding in the pattern to avoid moving the value
314
314
LL | let ref a @ (mut b @ ref mut c, ref d @ ref e) = (u(), u());
315
315
| +++ +++
316
316
317
- error[E0382]: use of moved value
318
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
317
+ error[E0382]: use of partially moved value
318
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:9
319
319
|
320
- LL | match Some((U, U)) {
321
- | ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
322
320
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
323
- | - value moved here ^ value used here after move
324
- |
325
- help: borrow this binding in the pattern to avoid moving the value
326
- |
327
- LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
328
- | +++
329
-
330
- error[E0382]: borrow of moved value
331
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:30
332
- |
333
- LL | match Some([U, U]) {
334
- | ------------ move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait
335
- LL | mut a @ Some([ref b, ref mut c]) => {}
336
- | ----- ^^^^^^^^^ value borrowed here after move
337
- | |
338
- | value moved here
339
-
340
- error[E0382]: borrow of moved value
341
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:18
342
- |
343
- LL | match Some(u()) {
344
- | --------- move occurs because value has type `Option<U>`, which does not implement the `Copy` trait
345
- LL | a @ Some(ref b) => {}
346
- | - ^^^^^ value borrowed here after move
321
+ | ^ - value partially moved here
347
322
| |
348
- | value moved here
323
+ | value used here after partial move
349
324
|
325
+ = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
350
326
help: borrow this binding in the pattern to avoid moving the value
351
327
|
352
- LL | ref a @ Some(ref b ) => {}
353
- | +++
328
+ LL | ref a @ Some((mut b @ ref mut c, ref d @ ref e) ) => {}
329
+ | +++ +++
354
330
355
- error[E0382]: use of moved value
356
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
331
+ error[E0382]: use of partially moved value
332
+ --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:65:9
357
333
|
358
- LL | match Some((u(), u())) {
359
- | ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
360
334
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
361
- | - value moved here ^ value used here after move
335
+ | ^ - value partially moved here
336
+ | |
337
+ | value used here after partial move
362
338
|
339
+ = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
363
340
help: borrow this binding in the pattern to avoid moving the value
364
341
|
365
- LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
366
- | +++
367
-
368
- error[E0382]: borrow of moved value
369
- --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:30
370
- |
371
- LL | match Some([u(), u()]) {
372
- | ---------------- move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait
373
- LL | mut a @ Some([ref b, ref mut c]) => {}
374
- | ----- ^^^^^^^^^ value borrowed here after move
375
- | |
376
- | value moved here
342
+ LL | ref a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
343
+ | +++ +++
377
344
378
345
error: borrow of moved value
379
346
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11:11
@@ -457,6 +424,6 @@ help: borrow this binding in the pattern to avoid moving the value
457
424
LL | fn f3(ref a @ [ref mut b, ref c]: [U; 2]) {}
458
425
| +++
459
426
460
- error: aborting due to 33 previous errors
427
+ error: aborting due to 30 previous errors
461
428
462
429
For more information about this error, try `rustc --explain E0382`.
0 commit comments