mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
986 lines
30 KiB
Plaintext
986 lines
30 KiB
Plaintext
error[E0507]: cannot move out of `s` which is behind a shared reference
|
|
--> $DIR/simple.rs:38:17
|
|
|
|
|
LL | let X(_t) = *s;
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - let X(_t) = *s;
|
|
LL + let X(_t) = s;
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:41:30
|
|
|
|
|
LL | if let Either::One(_t) = *r { }
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - if let Either::One(_t) = *r { }
|
|
LL + if let Either::One(_t) = r { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:44:33
|
|
|
|
|
LL | while let Either::One(_t) = *r { }
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - while let Either::One(_t) = *r { }
|
|
LL + while let Either::One(_t) = r { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:47:11
|
|
|
|
|
LL | match *r {
|
|
| ^^
|
|
...
|
|
LL | Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - match *r {
|
|
LL + match r {
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:53:11
|
|
|
|
|
LL | match *r {
|
|
| ^^
|
|
...
|
|
LL | Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - match *r {
|
|
LL + match r {
|
|
|
|
|
|
|
error[E0507]: cannot move out of `sm` which is behind a mutable reference
|
|
--> $DIR/simple.rs:61:17
|
|
|
|
|
LL | let X(_t) = *sm;
|
|
| -- ^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - let X(_t) = *sm;
|
|
LL + let X(_t) = sm;
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:64:30
|
|
|
|
|
LL | if let Either::One(_t) = *rm { }
|
|
| -- ^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - if let Either::One(_t) = *rm { }
|
|
LL + if let Either::One(_t) = rm { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:67:33
|
|
|
|
|
LL | while let Either::One(_t) = *rm { }
|
|
| -- ^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - while let Either::One(_t) = *rm { }
|
|
LL + while let Either::One(_t) = rm { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:70:11
|
|
|
|
|
LL | match *rm {
|
|
| ^^^
|
|
...
|
|
LL | Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - match *rm {
|
|
LL + match rm {
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:76:11
|
|
|
|
|
LL | match *rm {
|
|
| ^^^
|
|
...
|
|
LL | Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - match *rm {
|
|
LL + match rm {
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:83:11
|
|
|
|
|
LL | match *rm {
|
|
| ^^^
|
|
...
|
|
LL | Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
LL - match *rm {
|
|
LL + match rm {
|
|
|
|
|
|
|
error[E0507]: cannot move out of index of `Vec<X>`
|
|
--> $DIR/simple.rs:91:17
|
|
|
|
|
LL | let X(_t) = vs[0];
|
|
| -- ^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | let X(_t) = &vs[0];
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:94:30
|
|
|
|
|
LL | if let Either::One(_t) = vr[0] { }
|
|
| -- ^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | if let Either::One(_t) = &vr[0] { }
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:97:33
|
|
|
|
|
LL | while let Either::One(_t) = vr[0] { }
|
|
| -- ^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | while let Either::One(_t) = &vr[0] { }
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:100:11
|
|
|
|
|
LL | match vr[0] {
|
|
| ^^^^^
|
|
...
|
|
LL | Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | match &vr[0] {
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:106:11
|
|
|
|
|
LL | match vr[0] {
|
|
| ^^^^^
|
|
...
|
|
LL | Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | match &vr[0] {
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<X>`
|
|
--> $DIR/simple.rs:114:17
|
|
|
|
|
LL | let X(_t) = vsm[0];
|
|
| -- ^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | let X(_t) = &vsm[0];
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:117:30
|
|
|
|
|
LL | if let Either::One(_t) = vrm[0] { }
|
|
| -- ^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | if let Either::One(_t) = &vrm[0] { }
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:120:33
|
|
|
|
|
LL | while let Either::One(_t) = vrm[0] { }
|
|
| -- ^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | while let Either::One(_t) = &vrm[0] { }
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:123:11
|
|
|
|
|
LL | match vrm[0] {
|
|
| ^^^^^^
|
|
...
|
|
LL | Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | match &vrm[0] {
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:129:11
|
|
|
|
|
LL | match vrm[0] {
|
|
| ^^^^^^
|
|
...
|
|
LL | Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | match &vrm[0] {
|
|
| +
|
|
|
|
error[E0507]: cannot move out of index of `Vec<Either>`
|
|
--> $DIR/simple.rs:136:11
|
|
|
|
|
LL | match vrm[0] {
|
|
| ^^^^^^
|
|
...
|
|
LL | Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | match &vrm[0] {
|
|
| +
|
|
|
|
error[E0507]: cannot move out of `s` which is behind a shared reference
|
|
--> $DIR/simple.rs:146:18
|
|
|
|
|
LL | let &X(_t) = s;
|
|
| -- ^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - let &X(_t) = s;
|
|
LL + let X(_t) = s;
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:149:31
|
|
|
|
|
LL | if let &Either::One(_t) = r { }
|
|
| -- ^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - if let &Either::One(_t) = r { }
|
|
LL + if let Either::One(_t) = r { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:152:34
|
|
|
|
|
LL | while let &Either::One(_t) = r { }
|
|
| -- ^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - while let &Either::One(_t) = r { }
|
|
LL + while let Either::One(_t) = r { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:155:11
|
|
|
|
|
LL | match r {
|
|
| ^
|
|
LL |
|
|
LL | &Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - &Either::One(_t)
|
|
LL + Either::One(_t)
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:162:11
|
|
|
|
|
LL | match r {
|
|
| ^
|
|
LL |
|
|
LL | &Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - &Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
|
|
--> $DIR/simple.rs:168:11
|
|
|
|
|
LL | match r {
|
|
| ^
|
|
LL |
|
|
LL | &Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - &Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of `sm` which is behind a mutable reference
|
|
--> $DIR/simple.rs:178:22
|
|
|
|
|
LL | let &mut X(_t) = sm;
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - let &mut X(_t) = sm;
|
|
LL + let X(_t) = sm;
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:181:35
|
|
|
|
|
LL | if let &mut Either::One(_t) = rm { }
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - if let &mut Either::One(_t) = rm { }
|
|
LL + if let Either::One(_t) = rm { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:184:38
|
|
|
|
|
LL | while let &mut Either::One(_t) = rm { }
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - while let &mut Either::One(_t) = rm { }
|
|
LL + while let Either::One(_t) = rm { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:187:11
|
|
|
|
|
LL | match rm {
|
|
| ^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| -- data moved here
|
|
LL |
|
|
LL | &mut Either::Two(_t) => (),
|
|
| -- ...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) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::Two(_t) => (),
|
|
LL + Either::Two(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:194:11
|
|
|
|
|
LL | match rm {
|
|
| ^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:200:11
|
|
|
|
|
LL | match rm {
|
|
| ^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
|
|
--> $DIR/simple.rs:206:11
|
|
|
|
|
LL | match rm {
|
|
| ^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:220:21
|
|
|
|
|
LL | let (&X(_t),) = (&x.clone(),);
|
|
| -- ^^^^^^^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | let (&X(ref _t),) = (&x.clone(),);
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:223:34
|
|
|
|
|
LL | if let (&Either::One(_t),) = (&e.clone(),) { }
|
|
| -- ^^^^^^^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | if let (&Either::One(ref _t),) = (&e.clone(),) { }
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:226:37
|
|
|
|
|
LL | while let (&Either::One(_t),) = (&e.clone(),) { }
|
|
| -- ^^^^^^^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | while let (&Either::One(ref _t),) = (&e.clone(),) { }
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:229:11
|
|
|
|
|
LL | match (&e.clone(),) {
|
|
| ^^^^^^^^^^^^^
|
|
LL |
|
|
LL | (&Either::One(_t),)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | (&Either::One(ref _t),)
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:239:25
|
|
|
|
|
LL | let (&mut X(_t),) = (&mut xm.clone(),);
|
|
| -- ^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | let (&mut X(ref _t),) = (&mut xm.clone(),);
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:242:38
|
|
|
|
|
LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
|
|
| -- ^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | if let (&mut Either::One(ref _t),) = (&mut em.clone(),) { }
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:245:41
|
|
|
|
|
LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
|
|
| -- ^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | while let (&mut Either::One(ref _t),) = (&mut em.clone(),) { }
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:248:11
|
|
|
|
|
LL | match (&mut em.clone(),) {
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | (&mut Either::One(_t),) => (),
|
|
| -- data moved here
|
|
LL |
|
|
LL | (&mut Either::Two(_t),) => (),
|
|
| -- ...and here
|
|
|
|
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | (&mut Either::One(ref _t),) => (),
|
|
| +++
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | (&mut Either::Two(ref _t),) => (),
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:261:18
|
|
|
|
|
LL | let &X(_t) = &x;
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - let &X(_t) = &x;
|
|
LL + let X(_t) = &x;
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:264:31
|
|
|
|
|
LL | if let &Either::One(_t) = &e { }
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - if let &Either::One(_t) = &e { }
|
|
LL + if let Either::One(_t) = &e { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:267:34
|
|
|
|
|
LL | while let &Either::One(_t) = &e { }
|
|
| -- ^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - while let &Either::One(_t) = &e { }
|
|
LL + while let Either::One(_t) = &e { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:270:11
|
|
|
|
|
LL | match &e {
|
|
| ^^
|
|
LL |
|
|
LL | &Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - &Either::One(_t)
|
|
LL + Either::One(_t)
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:277:11
|
|
|
|
|
LL | match &e {
|
|
| ^^
|
|
LL |
|
|
LL | &Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - &Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:283:11
|
|
|
|
|
LL | match &e {
|
|
| ^^
|
|
LL |
|
|
LL | &Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - &Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:290:22
|
|
|
|
|
LL | let &mut X(_t) = &mut xm;
|
|
| -- ^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - let &mut X(_t) = &mut xm;
|
|
LL + let X(_t) = &mut xm;
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:293:35
|
|
|
|
|
LL | if let &mut Either::One(_t) = &mut em { }
|
|
| -- ^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - if let &mut Either::One(_t) = &mut em { }
|
|
LL + if let Either::One(_t) = &mut em { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:296:38
|
|
|
|
|
LL | while let &mut Either::One(_t) = &mut em { }
|
|
| -- ^^^^^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - while let &mut Either::One(_t) = &mut em { }
|
|
LL + while let Either::One(_t) = &mut em { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:299:11
|
|
|
|
|
LL | match &mut em {
|
|
| ^^^^^^^
|
|
LL |
|
|
LL | &mut Either::One(_t)
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t)
|
|
LL + Either::One(_t)
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:306:11
|
|
|
|
|
LL | match &mut em {
|
|
| ^^^^^^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:312:11
|
|
|
|
|
LL | match &mut em {
|
|
| ^^^^^^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:318:11
|
|
|
|
|
LL | match &mut em {
|
|
| ^^^^^^^
|
|
LL |
|
|
LL | &mut Either::One(_t) => (),
|
|
| --
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `X`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - &mut Either::One(_t) => (),
|
|
LL + Either::One(_t) => (),
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:174:11
|
|
|
|
|
LL | fn f1(&X(_t): &X) { }
|
|
| ^^^--^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
LL - fn f1(&X(_t): &X) { }
|
|
LL + fn f1(X(_t): &X) { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:212:11
|
|
|
|
|
LL | fn f2(&mut X(_t): &mut X) { }
|
|
| ^^^^^^^--^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider removing the mutable borrow
|
|
|
|
|
LL - fn f2(&mut X(_t): &mut X) { }
|
|
LL + fn f2(X(_t): &mut X) { }
|
|
|
|
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
--> $DIR/simple.rs:235:11
|
|
|
|
|
LL | fn f3((&X(_t),): (&X,)) { }
|
|
| ^^^^--^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | fn f3((&X(ref _t),): (&X,)) { }
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of a mutable reference
|
|
--> $DIR/simple.rs:255:11
|
|
|
|
|
LL | fn f4((&mut X(_t),): (&mut X,)) { }
|
|
| ^^^^^^^^--^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | fn f4((&mut X(ref _t),): (&mut X,)) { }
|
|
| +++
|
|
|
|
error[E0507]: cannot move out of `a.a` as enum variant `Some` which is behind a shared reference
|
|
--> $DIR/simple.rs:331:20
|
|
|
|
|
LL | let Some(_s) = a.a else {
|
|
| -- ^^^
|
|
| |
|
|
| data moved here
|
|
| move occurs because `_s` has type `String`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
LL | let Some(ref _s) = a.a else {
|
|
| +++
|
|
|
|
error: aborting due to 61 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0507`.
|