summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr')
-rw-r--r--tests/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr309
1 files changed, 309 insertions, 0 deletions
diff --git a/tests/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr b/tests/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr
new file mode 100644
index 000000000..b96b3713f
--- /dev/null
+++ b/tests/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr
@@ -0,0 +1,309 @@
+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
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - let &(X(_t), X(_u)) = &(x.clone(), x.clone());
+LL + let (X(_t), X(_u)) = &(x.clone(), x.clone());
+ |
+
+error[E0507]: cannot move out of a shared reference
+ --> $DIR/duplicate-suggestions.rs:42:50
+ |
+LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
+ | -- -- ^^^^^^^^^^^^^^^^^^^^^^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
+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:45:53
+ |
+LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
+ | -- -- ^^^^^^^^^^^^^^^^^^^^^^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
+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:48:11
+ |
+LL | match &(e.clone(), e.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &(Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+LL |
+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
+help: consider removing the borrow
+ |
+LL - &(Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+help: consider removing the borrow
+ |
+LL - &(Either::Two(_t), Either::One(_u)) => (),
+LL + (Either::Two(_t), Either::One(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a shared reference
+ --> $DIR/duplicate-suggestions.rs:56:11
+ |
+LL | match &(e.clone(), e.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &(Either::One(_t), Either::Two(_u))
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - &(Either::One(_t), Either::Two(_u))
+LL + (Either::One(_t), Either::Two(_u))
+ |
+
+error[E0507]: cannot move out of a shared reference
+ --> $DIR/duplicate-suggestions.rs:64:11
+ |
+LL | match &(e.clone(), e.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &(Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - &(Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a shared reference
+ --> $DIR/duplicate-suggestions.rs:71:11
+ |
+LL | match &(e.clone(), e.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &(Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - &(Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:82:31
+ |
+LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
+ | -- -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
+LL + let (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:85:54
+ |
+LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
+ | -- -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
+LL + if let (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:88:57
+ |
+LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
+ | -- -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
+LL + while let (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:91:11
+ |
+LL | match &mut (em.clone(), em.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &mut (Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+LL |
+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
+help: consider removing the mutable borrow
+ |
+LL - &mut (Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+help: consider removing the mutable borrow
+ |
+LL - &mut (Either::Two(_t), Either::One(_u)) => (),
+LL + (Either::Two(_t), Either::One(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:99:11
+ |
+LL | match &mut (em.clone(), em.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &mut (Either::One(_t), Either::Two(_u))
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - &mut (Either::One(_t), Either::Two(_u))
+LL + (Either::One(_t), Either::Two(_u))
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:107:11
+ |
+LL | match &mut (em.clone(), em.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &mut (Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - &mut (Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:114:11
+ |
+LL | match &mut (em.clone(), em.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &mut (Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - &mut (Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:121:11
+ |
+LL | match &mut (em.clone(), em.clone()) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | &mut (Either::One(_t), Either::Two(_u)) => (),
+ | -- -- ...and here
+ | |
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - &mut (Either::One(_t), Either::Two(_u)) => (),
+LL + (Either::One(_t), Either::Two(_u)) => (),
+ |
+
+error[E0507]: cannot move out of a shared reference
+ --> $DIR/duplicate-suggestions.rs:78:11
+ |
+LL | fn f5(&(X(_t), X(_u)): &(X, X)) { }
+ | ^^^^--^^^^^--^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the borrow
+ |
+LL - fn f5(&(X(_t), X(_u)): &(X, X)) { }
+LL + fn f5((X(_t), X(_u)): &(X, X)) { }
+ |
+
+error[E0507]: cannot move out of a mutable reference
+ --> $DIR/duplicate-suggestions.rs:128:11
+ |
+LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
+ | ^^^^^^^^--^^^^^--^^
+ | | |
+ | | ...and here
+ | data moved here
+ |
+ = note: move occurs because these variables have types that don't implement the `Copy` trait
+help: consider removing the mutable borrow
+ |
+LL - fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
+LL + fn f6((X(_t), X(_u)): &mut (X, X)) { }
+ |
+
+error: aborting due to 17 previous errors
+
+For more information about this error, try `rustc --explain E0507`.