From 81c27c6af74670045c1e6f8550475087861d3c76 Mon Sep 17 00:00:00 2001 From: ashtneoi Date: Mon, 13 Aug 2018 21:49:39 -0700 Subject: [PATCH] Add another FIXME about suggestions --- src/test/ui/suggestions/dont-suggest-ref.rs | 4 +- .../ui/suggestions/dont-suggest-ref.stderr | 160 +++++++++--------- 2 files changed, 83 insertions(+), 81 deletions(-) diff --git a/src/test/ui/suggestions/dont-suggest-ref.rs b/src/test/ui/suggestions/dont-suggest-ref.rs index 67e8b4a0e95..3f5b87e5ea6 100644 --- a/src/test/ui/suggestions/dont-suggest-ref.rs +++ b/src/test/ui/suggestions/dont-suggest-ref.rs @@ -263,7 +263,9 @@ fn f2(&mut X(_t): &mut X) { } //~| HELP consider removing the `&mut` //~| SUGGESTION X(_t) - // -------- move from tuple of &Either/&X (no suggestions) -------- + // -------- move from tuple of &Either/&X -------- + + // FIXME: These should have suggestions. let (&X(_t),) = (&x.clone(),); //~^ ERROR cannot move diff --git a/src/test/ui/suggestions/dont-suggest-ref.stderr b/src/test/ui/suggestions/dont-suggest-ref.stderr index 7d365e8788f..8994152d1a5 100644 --- a/src/test/ui/suggestions/dont-suggest-ref.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref.stderr @@ -598,7 +598,7 @@ LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:268:21 + --> $DIR/dont-suggest-ref.rs:270:21 | LL | let (&X(_t),) = (&x.clone(),); | -- ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -606,13 +606,13 @@ LL | let (&X(_t),) = (&x.clone(),); | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:268:13 + --> $DIR/dont-suggest-ref.rs:270:13 | LL | let (&X(_t),) = (&x.clone(),); | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:270:34 + --> $DIR/dont-suggest-ref.rs:272:34 | LL | if let (&Either::One(_t),) = (&e.clone(),) { } | -- ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -620,13 +620,13 @@ LL | if let (&Either::One(_t),) = (&e.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:270:26 + --> $DIR/dont-suggest-ref.rs:272:26 | LL | if let (&Either::One(_t),) = (&e.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:272:37 + --> $DIR/dont-suggest-ref.rs:274:37 | LL | while let (&Either::One(_t),) = (&e.clone(),) { } | -- ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -634,13 +634,13 @@ LL | while let (&Either::One(_t),) = (&e.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:272:29 + --> $DIR/dont-suggest-ref.rs:274:29 | LL | while let (&Either::One(_t),) = (&e.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:274:11 + --> $DIR/dont-suggest-ref.rs:276:11 | LL | match (&e.clone(),) { | ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -649,13 +649,13 @@ LL | (&Either::One(_t),) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:276:23 + --> $DIR/dont-suggest-ref.rs:278:23 | LL | (&Either::One(_t),) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:282:25 + --> $DIR/dont-suggest-ref.rs:284:25 | LL | let (&mut X(_t),) = (&mut xm.clone(),); | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -663,13 +663,13 @@ LL | let (&mut X(_t),) = (&mut xm.clone(),); | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:282:17 + --> $DIR/dont-suggest-ref.rs:284:17 | LL | let (&mut X(_t),) = (&mut xm.clone(),); | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:284:38 + --> $DIR/dont-suggest-ref.rs:286:38 | LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { } | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -677,13 +677,13 @@ LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:284:30 + --> $DIR/dont-suggest-ref.rs:286:30 | LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:286:41 + --> $DIR/dont-suggest-ref.rs:288:41 | LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { } | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -691,13 +691,13 @@ LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:286:33 + --> $DIR/dont-suggest-ref.rs:288:33 | LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:288:11 + --> $DIR/dont-suggest-ref.rs:290:11 | LL | match (&mut em.clone(),) { | ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -708,7 +708,7 @@ LL | (&mut Either::Two(_t),) => (), | -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:290:27 + --> $DIR/dont-suggest-ref.rs:292:27 | LL | (&mut Either::One(_t),) => (), | ^^ @@ -716,7 +716,7 @@ LL | (&mut Either::Two(_t),) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:298:18 + --> $DIR/dont-suggest-ref.rs:300:18 | LL | let &X(_t) = &x; | ------ ^^ cannot move out of borrowed content @@ -725,13 +725,13 @@ LL | let &X(_t) = &x; | help: consider removing the `&`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:298:12 + --> $DIR/dont-suggest-ref.rs:300:12 | LL | let &X(_t) = &x; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:302:31 + --> $DIR/dont-suggest-ref.rs:304:31 | LL | if let &Either::One(_t) = &e { } | ---------------- ^^ cannot move out of borrowed content @@ -740,13 +740,13 @@ LL | if let &Either::One(_t) = &e { } | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:302:25 + --> $DIR/dont-suggest-ref.rs:304:25 | LL | if let &Either::One(_t) = &e { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:306:34 + --> $DIR/dont-suggest-ref.rs:308:34 | LL | while let &Either::One(_t) = &e { } | ---------------- ^^ cannot move out of borrowed content @@ -755,13 +755,13 @@ LL | while let &Either::One(_t) = &e { } | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:306:28 + --> $DIR/dont-suggest-ref.rs:308:28 | LL | while let &Either::One(_t) = &e { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:310:11 + --> $DIR/dont-suggest-ref.rs:312:11 | LL | match &e { | ^^ cannot move out of borrowed content @@ -773,13 +773,13 @@ LL | &Either::One(_t) | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:312:22 + --> $DIR/dont-suggest-ref.rs:314:22 | LL | &Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:318:11 + --> $DIR/dont-suggest-ref.rs:320:11 | LL | match &e { | ^^ cannot move out of borrowed content @@ -791,13 +791,13 @@ LL | &Either::One(_t) => (), | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:320:22 + --> $DIR/dont-suggest-ref.rs:322:22 | LL | &Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:325:11 + --> $DIR/dont-suggest-ref.rs:327:11 | LL | match &e { | ^^ cannot move out of borrowed content @@ -809,13 +809,13 @@ LL | &Either::One(_t) => (), | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:327:22 + --> $DIR/dont-suggest-ref.rs:329:22 | LL | &Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:333:22 + --> $DIR/dont-suggest-ref.rs:335:22 | LL | let &mut X(_t) = &mut xm; | ---------- ^^^^^^^ cannot move out of borrowed content @@ -824,13 +824,13 @@ LL | let &mut X(_t) = &mut xm; | help: consider removing the `&mut`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:333:16 + --> $DIR/dont-suggest-ref.rs:335:16 | LL | let &mut X(_t) = &mut xm; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:337:35 + --> $DIR/dont-suggest-ref.rs:339:35 | LL | if let &mut Either::One(_t) = &mut em { } | -------------------- ^^^^^^^ cannot move out of borrowed content @@ -839,13 +839,13 @@ LL | if let &mut Either::One(_t) = &mut em { } | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:337:29 + --> $DIR/dont-suggest-ref.rs:339:29 | LL | if let &mut Either::One(_t) = &mut em { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:341:38 + --> $DIR/dont-suggest-ref.rs:343:38 | LL | while let &mut Either::One(_t) = &mut em { } | -------------------- ^^^^^^^ cannot move out of borrowed content @@ -854,13 +854,13 @@ LL | while let &mut Either::One(_t) = &mut em { } | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:341:32 + --> $DIR/dont-suggest-ref.rs:343:32 | LL | while let &mut Either::One(_t) = &mut em { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:345:11 + --> $DIR/dont-suggest-ref.rs:347:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -872,13 +872,13 @@ LL | &mut Either::One(_t) | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:347:26 + --> $DIR/dont-suggest-ref.rs:349:26 | LL | &mut Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:353:11 + --> $DIR/dont-suggest-ref.rs:355:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -890,13 +890,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:355:26 + --> $DIR/dont-suggest-ref.rs:357:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:360:11 + --> $DIR/dont-suggest-ref.rs:362:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -908,13 +908,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:362:26 + --> $DIR/dont-suggest-ref.rs:364:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:367:11 + --> $DIR/dont-suggest-ref.rs:369:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -926,13 +926,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:369:26 + --> $DIR/dont-suggest-ref.rs:371:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:377:27 + --> $DIR/dont-suggest-ref.rs:379:27 | LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | --------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -942,13 +942,13 @@ LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | help: consider removing the `&`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:377:13 + --> $DIR/dont-suggest-ref.rs:379:13 | LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:381:50 + --> $DIR/dont-suggest-ref.rs:383:50 | LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -958,13 +958,13 @@ LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:381:26 + --> $DIR/dont-suggest-ref.rs:383:26 | LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:385:53 + --> $DIR/dont-suggest-ref.rs:387:53 | LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -974,13 +974,13 @@ LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:385:29 + --> $DIR/dont-suggest-ref.rs:387:29 | LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:389:11 + --> $DIR/dont-suggest-ref.rs:391:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -994,7 +994,7 @@ LL | &(Either::Two(_t), Either::One(_u)) => (), | -- ...and here -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:391:23 + --> $DIR/dont-suggest-ref.rs:393:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ @@ -1011,7 +1011,7 @@ LL | (Either::Two(_t), Either::One(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:399:11 + --> $DIR/dont-suggest-ref.rs:401:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1024,13 +1024,13 @@ LL | &(Either::One(_t), Either::Two(_u)) | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:401:23 + --> $DIR/dont-suggest-ref.rs:403:23 | LL | &(Either::One(_t), Either::Two(_u)) | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:408:11 + --> $DIR/dont-suggest-ref.rs:410:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1043,13 +1043,13 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:410:23 + --> $DIR/dont-suggest-ref.rs:412:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:416:11 + --> $DIR/dont-suggest-ref.rs:418:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1062,13 +1062,13 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:418:23 + --> $DIR/dont-suggest-ref.rs:420:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:429:31 + --> $DIR/dont-suggest-ref.rs:431:31 | LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1078,13 +1078,13 @@ LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | help: consider removing the `&mut`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:429:17 + --> $DIR/dont-suggest-ref.rs:431:17 | LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:433:54 + --> $DIR/dont-suggest-ref.rs:435:54 | LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1094,13 +1094,13 @@ LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.c | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:433:30 + --> $DIR/dont-suggest-ref.rs:435:30 | LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:437:57 + --> $DIR/dont-suggest-ref.rs:439:57 | LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1110,13 +1110,13 @@ LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), e | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:437:33 + --> $DIR/dont-suggest-ref.rs:439:33 | LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:441:11 + --> $DIR/dont-suggest-ref.rs:443:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1130,7 +1130,7 @@ LL | &mut (Either::Two(_t), Either::One(_u)) => (), | -- ...and here -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:443:27 + --> $DIR/dont-suggest-ref.rs:445:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ @@ -1147,7 +1147,7 @@ LL | (Either::Two(_t), Either::One(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:451:11 + --> $DIR/dont-suggest-ref.rs:453:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1160,13 +1160,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:453:27 + --> $DIR/dont-suggest-ref.rs:455:27 | LL | &mut (Either::One(_t), Either::Two(_u)) | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:460:11 + --> $DIR/dont-suggest-ref.rs:462:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1179,13 +1179,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:462:27 + --> $DIR/dont-suggest-ref.rs:464:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:468:11 + --> $DIR/dont-suggest-ref.rs:470:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1198,13 +1198,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:470:27 + --> $DIR/dont-suggest-ref.rs:472:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:476:11 + --> $DIR/dont-suggest-ref.rs:478:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -1217,7 +1217,7 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:478:27 + --> $DIR/dont-suggest-ref.rs:480:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ @@ -1255,7 +1255,7 @@ LL | fn f2(&mut X(_t): &mut X) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:279:11 + --> $DIR/dont-suggest-ref.rs:281:11 | LL | fn f3((&X(_t),): (&X,)) { } | ^^^^--^^^ @@ -1264,13 +1264,13 @@ LL | fn f3((&X(_t),): (&X,)) { } | cannot move out of borrowed content | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:279:15 + --> $DIR/dont-suggest-ref.rs:281:15 | LL | fn f3((&X(_t),): (&X,)) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:293:11 + --> $DIR/dont-suggest-ref.rs:295:11 | LL | fn f4((&mut X(_t),): (&mut X,)) { } | ^^^^^^^^--^^^ @@ -1279,13 +1279,13 @@ LL | fn f4((&mut X(_t),): (&mut X,)) { } | cannot move out of borrowed content | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:293:19 + --> $DIR/dont-suggest-ref.rs:295:19 | LL | fn f4((&mut X(_t),): (&mut X,)) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:424:11 + --> $DIR/dont-suggest-ref.rs:426:11 | LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | ^^^^--^^^^^--^^ @@ -1296,13 +1296,13 @@ LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | help: consider removing the `&`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:424:15 + --> $DIR/dont-suggest-ref.rs:426:15 | LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/dont-suggest-ref.rs:484:11 + --> $DIR/dont-suggest-ref.rs:486:11 | LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | ^^^^^^^^--^^^^^--^^ @@ -1313,7 +1313,7 @@ LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | help: consider removing the `&mut`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/dont-suggest-ref.rs:484:19 + --> $DIR/dont-suggest-ref.rs:486:19 | LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | ^^ ^^ -- 2.44.0