@@ -357,6 +357,10 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
357357 | value moved here
358358 |
359359 = 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+ | ^^^
360364
361365error[E0382]: use of moved value
362366 --> $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)) => {}
379383 | value moved here
380384 |
381385 = 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+ | ^^^
382390
383391error[E0382]: borrow of moved value
384392 --> $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)) => {}
412420 | value moved here
413421 |
414422 = 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+ | ^^^
415427
416428error[E0382]: use of moved value
417429 --> $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)) => {}
434446 | value moved here
435447 |
436448 = 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+ | ^^^
437453
438454error[E0382]: borrow of moved value
439455 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:30
0 commit comments