error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:39:27 | LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | --------------- ^^^^^^^^^^^^^^^^^^^^^^^ | | | | | | | ...and here | | data moved here | help: consider removing the `&`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait --> $DIR/duplicate-suggestions.rs:39:13 | LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | ^^ ^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:43:50 | LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:43:26 | LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ^^ ^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:47:53 | LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:47:29 | LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ^^ ^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:51:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &(Either::One(_t), Either::Two(_u)) => (), | -- -- ...and here | | | data moved here ... 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/duplicate-suggestions.rs:53:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ ... LL | &(Either::Two(_t), Either::One(_u)) => (), | ^^ ^^ help: consider removing the `&` | LL | (Either::One(_t), Either::Two(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `&` | LL | (Either::Two(_t), Either::One(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:61:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &(Either::One(_t), Either::Two(_u)) | ----------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:63:23 | LL | &(Either::One(_t), Either::Two(_u)) | ^^ ^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:70:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &(Either::One(_t), Either::Two(_u)) => (), | ----------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:72:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:78:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &(Either::One(_t), Either::Two(_u)) => (), | ----------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:80:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:91:31 | LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:91:17 | LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:95:54 | LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:95:30 | LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:99:57 | LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:99:33 | LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:103:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | -- -- ...and here | | | data moved here ... 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/duplicate-suggestions.rs:105:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ ... LL | &mut (Either::Two(_t), Either::One(_u)) => (), | ^^ ^^ help: consider removing the `&mut` | LL | (Either::One(_t), Either::Two(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `&mut` | LL | (Either::Two(_t), Either::One(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:113:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &mut (Either::One(_t), Either::Two(_u)) | --------------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:115:27 | LL | &mut (Either::One(_t), Either::Two(_u)) | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:122:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | --------------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:124:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:130:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | --------------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:132:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:138:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | --------------------------------------- | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:140:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:86:11 | LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | ^^^^--^^^^^--^^ | | | | | | | ...and here | | data moved here | help: consider removing the `&`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait --> $DIR/duplicate-suggestions.rs:86:15 | LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | ^^ ^^ error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:146:11 | LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | ^^^^^^^^--^^^^^--^^ | | | | | | | ...and here | | data moved here | 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/duplicate-suggestions.rs:146:19 | LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | ^^ ^^ error: aborting due to 17 previous errors For more information about this error, try `rustc --explain E0507`.