| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `f`
+ | help: consider removing the `*`: `f`
LL | //~| cannot move out
LL | Foo::Foo1(num1,
- | ---- move occurs because num1 has type `std::boxed::Box<u32>`, which does not implement the `Copy` trait
+ | ---- data moved here
LL | num2) => (),
- | ---- move occurs because num2 has type `std::boxed::Box<u32>`, which does not implement the `Copy` trait
+ | ---- ...and here
LL | Foo::Foo2(num) => (),
- | --- move occurs because num has type `std::boxed::Box<u32>`, which does not implement the `Copy` trait
+ | --- ...and here
+ |
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/borrowck-move-error-with-note.rs:23:19
+ |
+LL | Foo::Foo1(num1,
+ | ^^^^
+LL | num2) => (),
+ | ^^^^
+LL | Foo::Foo2(num) => (),
+ | ^^^
error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
--> $DIR/borrowck-move-error-with-note.rs:39:11
LL | f: _s,
| -- data moved here
LL | g: _t
- | -- ... and here
-help: to prevent move, use ref or ref mut
+ | -- ...and here
|
-LL | f: ref _s,
-LL | g: ref _t
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/borrowck-move-error-with-note.rs:42:16
|
+LL | f: _s,
+ | ^^
+LL | g: _t
+ | ^^
error[E0507]: cannot move out of borrowed content
--> $DIR/borrowck-move-error-with-note.rs:57:11
| ^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&a.a`
+ | help: consider borrowing here: `&a.a`
LL | //~| cannot move out
LL | n => {
- | - move occurs because n has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+ | - data moved here
+ |
+note: move occurs because `n` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+ --> $DIR/borrowck-move-error-with-note.rs:59:9
+ |
+LL | n => {
+ | ^
error: aborting due to 3 previous errors
| - data moved here
...
LL | Foo { string: b }] => {
- | - ... and here
-help: to prevent move, use ref or ref mut
+ | - ...and here
|
-LL | &[Foo { string: ref a },
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/borrowck-move-out-of-vec-tail.rs:30:33
+ |
+LL | &[Foo { string: a },
+ | ^
+...
+LL | Foo { string: b }] => {
+ | ^
+help: consider removing the `&`
+ |
+LL | [Foo { string: a },
LL | //~^ ERROR cannot move out of type `[Foo]`
LL | //~| cannot move out
LL | //~| to prevent move
-LL | Foo { string: ref b }] => {
+LL | Foo { string: b }] => {
|
error: aborting due to previous error
LL | match vec {
| ^^^ cannot move out of here
LL | &mut [_a, //~ ERROR cannot move out
- | --
- | |
- | data moved here
- | help: to prevent move, use ref or ref mut: `ref _a`
+ | -- data moved here
+ |
+note: move occurs because `_a` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+ --> $DIR/borrowck-vec-pattern-nesting.rs:44:15
+ |
+LL | &mut [_a, //~ ERROR cannot move out
+ | ^^
+help: consider removing the `&mut`
+ |
+LL | [_a, //~ ERROR cannot move out
+LL | //~| cannot move out
+LL | //~| to prevent move
+LL | ..
+LL | ] => {
+ |
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice
--> $DIR/borrowck-vec-pattern-nesting.rs:57:13
| ^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&vec[0]`
+ | help: consider borrowing here: `&vec[0]`
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice
--> $DIR/borrowck-vec-pattern-nesting.rs:64:11
| ^^^ cannot move out of here
...
LL | _b] => {}
- | --
- | |
- | data moved here
- | help: to prevent move, use ref or ref mut: `ref _b`
+ | -- data moved here
+ |
+note: move occurs because `_b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+ --> $DIR/borrowck-vec-pattern-nesting.rs:67:10
+ |
+LL | _b] => {}
+ | ^^
+help: consider removing the `&mut`
+ |
+LL | [ //~ ERROR cannot move out
+LL | //~^ cannot move out
+LL | _b] => {}
+ |
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice
--> $DIR/borrowck-vec-pattern-nesting.rs:70:13
| ^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&vec[0]`
+ | help: consider borrowing here: `&vec[0]`
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice
--> $DIR/borrowck-vec-pattern-nesting.rs:77:11
LL | match vec {
| ^^^ cannot move out of here
LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out
- | -- -- -- ... and here
- | | |
- | | ... and here
- | data moved here
-help: to prevent move, use ref or ref mut
- |
-LL | &mut [ref _a, ref _b, ref _c] => {} //~ ERROR cannot move out
- | ^^^^^^ ^^^^^^ ^^^^^^
+ | -----------------
+ | | | | |
+ | | | | ...and here
+ | | | ...and here
+ | | data moved here
+ | help: consider removing the `&mut`: `[_a, _b, _c]`
+ |
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/borrowck-vec-pattern-nesting.rs:78:15
+ |
+LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out
+ | ^^ ^^ ^^
error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice
--> $DIR/borrowck-vec-pattern-nesting.rs:82:13
| ^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&vec[0]`
+ | help: consider borrowing here: `&vec[0]`
error: aborting due to 8 previous errors
| ^^^^^-^
| | |
| | data moved here
- | | help: to prevent move, use ref or ref mut: `ref s`
| cannot move out of borrowed content
+ |
+note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/issue-51415.rs:16:47
+ |
+LL | let opt = a.iter().enumerate().find(|(_, &s)| {
+ | ^
error: aborting due to previous error
LL | match (S {f:"foo".to_string()}) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
LL | S {f:_s} => {} //~ ERROR cannot move out
- | --
- | |
- | data moved here
- | help: to prevent move, use ref or ref mut: `ref _s`
+ | -- data moved here
+ |
+note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/overlapping_spans.rs:21:14
+ |
+LL | S {f:_s} => {} //~ ERROR cannot move out
+ | ^^
error: aborting due to previous error
| -- data moved here
...
LL | (&[hd1, ..], &[hd2, ..])
- | --- ... and here
-help: to prevent move, use ref or ref mut
+ | --- ...and here
|
-LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
-LL | => println!("one empty"),
-LL | //~^^ ERROR: cannot move out of type `[T]`, a non-copy slice
-LL | //~^^^ ERROR: cannot move out of type `[T]`, a non-copy slice
-LL | (&[hd1, ..], &[ref hd2, ..])
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/issue-12567.rs:16:17
|
+LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
+ | ^^
+...
+LL | (&[hd1, ..], &[hd2, ..])
+ | ^^^
error[E0508]: cannot move out of type `[T]`, a non-copy slice
--> $DIR/issue-12567.rs:14:11
| -- data moved here
...
LL | (&[hd1, ..], &[hd2, ..])
- | --- ... and here
-help: to prevent move, use ref or ref mut
+ | --- ...and here
|
-LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
-LL | => println!("one empty"),
-LL | //~^^ ERROR: cannot move out of type `[T]`, a non-copy slice
-LL | //~^^^ ERROR: cannot move out of type `[T]`, a non-copy slice
-LL | (&[ref hd1, ..], &[hd2, ..])
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/issue-12567.rs:16:17
|
+LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
+ | ^^
+...
+LL | (&[hd1, ..], &[hd2, ..])
+ | ^^^
error: aborting due to 2 previous errors
| ^^^^^^^^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&*mut_ref()`
+ | help: consider removing the `*`: `mut_ref()`
error[E0507]: cannot move out of borrowed content
--> $DIR/issue-20801.rs:39:22
| ^^^^^^^^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&*imm_ref()`
+ | help: consider removing the `*`: `imm_ref()`
error[E0507]: cannot move out of borrowed content
--> $DIR/issue-20801.rs:42:22
| ^^^^^^^^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&*mut_ptr()`
+ | help: consider removing the `*`: `mut_ptr()`
error[E0507]: cannot move out of borrowed content
--> $DIR/issue-20801.rs:45:22
| ^^^^^^^^^^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&*const_ptr()`
+ | help: consider removing the `*`: `const_ptr()`
error: aborting due to 4 previous errors
| ^^^^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&f.v[0]`
+ | help: consider borrowing here: `&f.v[0]`
error: aborting due to previous error
| - - ^^^^
| | | |
| | | cannot move out of borrowed content
- | | | help: consider using a reference instead: `&x[0]`
- | | move occurs because b has type `std::string::String`, which does not implement the `Copy` trait
- | move occurs because a has type `std::string::String`, which does not implement the `Copy` trait
+ | | | help: consider borrowing here: `&x[0]`
+ | | ...and here
+ | data moved here
+ |
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/issue-40402-2.rs:15:10
+ |
+LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content
+ | ^ ^
error: aborting due to previous error
| ^^^^^^^^^^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&hellothere.x`
+ | help: consider borrowing here: `&hellothere.x`
...
LL | box E::Bar(x) => println!("{}", x.to_string()),
- | - move occurs because x has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+ | - data moved here
+ |
+note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+ --> $DIR/moves-based-on-type-block-bad.rs:37:28
+ |
+LL | box E::Bar(x) => println!("{}", x.to_string()),
+ | ^
error: aborting due to previous error
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `r`
+ | help: consider removing the `*`: `r`
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:16:22
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `r`
+ | help: consider removing the `*`: `r`
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:17:26
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `r`
+ | help: consider removing the `*`: `r`
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
--> $DIR/cannot-move-block-spans.rs:21:15
| ^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&arr[0]`
+ | help: consider borrowing here: `&arr[0]`
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
--> $DIR/cannot-move-block-spans.rs:22:22
| ^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&arr[0]`
+ | help: consider borrowing here: `&arr[0]`
error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array
--> $DIR/cannot-move-block-spans.rs:23:26
| ^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&arr[0]`
+ | help: consider borrowing here: `&arr[0]`
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:27:38
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `r`
+ | help: consider removing the `*`: `r`
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:28:45
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `r`
+ | help: consider removing the `*`: `r`
error[E0507]: cannot move out of borrowed content
--> $DIR/cannot-move-block-spans.rs:29:49
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `r`
+ | help: consider removing the `*`: `r`
error: aborting due to 9 previous errors
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `a`
+ | help: consider removing the `*`: `a`
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
--> $DIR/move-errors.rs:25:13
| ^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&a[0]`
+ | help: consider borrowing here: `&a[0]`
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:32:13
| ^^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&**r`
+ | help: consider removing the `*`: `*r`
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:40:13
| ^^
| |
| cannot move out of borrowed content
- | help: consider using a reference instead: `&*r`
+ | help: consider removing the `*`: `r`
error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
--> $DIR/move-errors.rs:45:13
| ^^^^^^^^^^^^^^^^^^^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&[A("".to_string())][0]`
+ | help: consider borrowing here: `&[A("".to_string())][0]`
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:51:16
| - ^^
| | |
| | cannot move out of borrowed content
- | | help: consider removing this dereference operator: `a`
- | move occurs because s has type `std::string::String`, which does not implement the `Copy` trait
+ | | help: consider removing the `*`: `a`
+ | data moved here
+ |
+note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/move-errors.rs:51:11
+ |
+LL | let A(s) = *a;
+ | ^
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
--> $DIR/move-errors.rs:57:19
| - ^ cannot move out of here
| |
| data moved here
- | help: to prevent move, use ref or ref mut: `ref s`
+ |
+note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/move-errors.rs:57:13
+ |
+LL | let C(D(s)) = c;
+ | ^
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:64:9
| ^^^^
| |
| cannot move out of here
- | help: consider using a reference instead: `&x[0]`
+ | help: consider borrowing here: `&x[0]`
LL | //~^ ERROR
LL | B::U(d) => (),
- | - move occurs because d has type `D`, which does not implement the `Copy` trait
+ | - data moved here
LL | B::V(s) => (),
- | - move occurs because s has type `std::string::String`, which does not implement the `Copy` trait
+ | - ...and here
+ |
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/move-errors.rs:89:14
+ |
+LL | B::U(d) => (),
+ | ^
+LL | B::V(s) => (),
+ | ^
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
--> $DIR/move-errors.rs:96:11
| ^ cannot move out of here
...
LL | B::U(D(s)) => (),
- | -
- | |
- | data moved here
- | help: to prevent move, use ref or ref mut: `ref s`
+ | - data moved here
+ |
+note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/move-errors.rs:99:16
+ |
+LL | B::U(D(s)) => (),
+ | ^
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
--> $DIR/move-errors.rs:105:11
| ^ cannot move out of here
...
LL | (D(s), &t) => (),
- | -
- | |
- | data moved here
- | help: to prevent move, use ref or ref mut: `ref s`
+ | - data moved here
+ |
+note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/move-errors.rs:108:12
+ |
+LL | (D(s), &t) => (),
+ | ^
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:105:11
| ^ cannot move out of borrowed content
...
LL | (D(s), &t) => (),
- | -
- | |
- | data moved here
- | help: to prevent move, use ref or ref mut: `ref t`
+ | - data moved here
+ |
+note: move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/move-errors.rs:108:17
+ |
+LL | (D(s), &t) => (),
+ | ^
error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
--> $DIR/move-errors.rs:115:11
| ^ cannot move out of here
LL | //~^ ERROR
LL | F(s, mut t) => (),
- | - ----- ... and here
+ | - ----- ...and here
| |
| data moved here
-help: to prevent move, use ref or ref mut
|
-LL | F(ref s, ref mut t) => (),
- | ^^^^^ ^^^^^^^^^
+note: move occurs because these variables have types that don't implement the `Copy` trait
+ --> $DIR/move-errors.rs:117:11
+ |
+LL | F(s, mut t) => (),
+ | ^ ^^^^^
error[E0507]: cannot move out of borrowed content
--> $DIR/move-errors.rs:123:11
| ^^
| |
| cannot move out of borrowed content
- | help: consider removing this dereference operator: `x`
+ | help: consider removing the `*`: `x`
LL | //~^ ERROR
LL | Ok(s) | Err(s) => (),
- | - move occurs because s has type `std::string::String`, which does not implement the `Copy` trait
+ | - data moved here
+ |
+note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
+ --> $DIR/move-errors.rs:125:12
+ |
+LL | Ok(s) | Err(s) => (),
+ | ^
error: aborting due to 14 previous errors
| -- data moved here
...
LL | &mut Either::Two(_t) => (),
- | -- ... and here
+ | -- ...and here
|
note: move occurs because these variables have types that don't implement the `Copy` trait
--> $DIR/dont-suggest-ref.rs:233:26
LL | (&mut Either::One(_t),) => (),
| -- data moved here
LL | (&mut Either::Two(_t),) => (),
- | -- ... and here
+ | -- ...and here
|
note: move occurs because these variables have types that don't implement the `Copy` trait
--> $DIR/dont-suggest-ref.rs:290:27
LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone());
| --------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&`: `(X(_t), X(_u))`
|
LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
| ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
|
LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
| ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
|
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
LL | //~^ ERROR cannot move
LL | &(Either::One(_t), Either::Two(_u)) => (),
- | -- -- ... and here
+ | -- -- ...and here
| |
| data moved here
...
LL | &(Either::Two(_t), Either::One(_u)) => (),
- | -- ... and here -- ... and here
+ | -- ...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
LL | &(Either::One(_t), Either::Two(_u))
| -----------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
|
LL | &(Either::One(_t), Either::Two(_u)) => (),
| -----------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
|
LL | &(Either::One(_t), Either::Two(_u)) => (),
| -----------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
|
LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
| ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(X(_t), X(_u))`
|
LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
| --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
|
LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
| --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
LL | //~^ ERROR cannot move
LL | &mut (Either::One(_t), Either::Two(_u)) => (),
- | -- -- ... and here
+ | -- -- ...and here
| |
| data moved here
...
LL | &mut (Either::Two(_t), Either::One(_u)) => (),
- | -- ... and here -- ... and here
+ | -- ...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
LL | &mut (Either::One(_t), Either::Two(_u))
| ---------------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
|
LL | &mut (Either::One(_t), Either::Two(_u)) => (),
| ---------------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
|
LL | &mut (Either::One(_t), Either::Two(_u)) => (),
| ---------------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
|
LL | &mut (Either::One(_t), Either::Two(_u)) => (),
| ---------------------------------------
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
|
LL | fn f5(&(X(_t), X(_u)): &(X, X)) { }
| ^^^^--^^^^^--^^
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| cannot move out of borrowed content
| help: consider removing the `&`: `(X(_t), X(_u))`
LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
| ^^^^^^^^--^^^^^--^^
| | | |
- | | | ... and here
+ | | | ...and here
| | data moved here
| cannot move out of borrowed content
| help: consider removing the `&mut`: `(X(_t), X(_u))`