@@ -357,6 +357,10 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
357
357
| value moved here
358
358
|
359
359
= note: move occurs because value has type `main::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
+ | ^^^
360
364
361
365
error[E0382]: use of moved value
362
366
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38
@@ -379,6 +383,10 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
379
383
| value moved here
380
384
|
381
385
= note: move occurs because value has type `main::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
+ | ^^^
382
390
383
391
error[E0382]: borrow of moved value
384
392
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:30
@@ -412,6 +420,10 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
412
420
| value moved here
413
421
|
414
422
= note: move occurs because value has type `main::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
+ | ^^^
415
427
416
428
error[E0382]: use of moved value
417
429
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38
@@ -434,6 +446,10 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
434
446
| value moved here
435
447
|
436
448
= note: move occurs because value has type `main::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
+ | ^^^
437
453
438
454
error[E0382]: borrow of moved value
439
455
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:30
0 commit comments