| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:40:21 |
| | |
| LL | let x = X(Y); |
| | - captured outer variable |
| ... |
| LL | let X(_t) = x; |
| | -- ^ |
| | | | |
| | | cannot move out of captured variable in an `Fn` closure |
| | | help: consider borrowing here: `&x` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:40:15 |
| | |
| LL | let X(_t) = x; |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:44:34 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | if let Either::One(_t) = e { } |
| | -- ^ |
| | | | |
| | | cannot move out of captured variable in an `Fn` closure |
| | | help: consider borrowing here: `&e` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:44:28 |
| | |
| LL | if let Either::One(_t) = e { } |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:48:37 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | while let Either::One(_t) = e { } |
| | -- ^ |
| | | | |
| | | cannot move out of captured variable in an `Fn` closure |
| | | help: consider borrowing here: `&e` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:48:31 |
| | |
| LL | while let Either::One(_t) = e { } |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:52:15 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | match e { |
| | ^ |
| | | |
| | cannot move out of captured variable in an `Fn` closure |
| | help: consider borrowing here: `&e` |
| ... |
| LL | Either::One(_t) |
| | -- data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:56:25 |
| | |
| LL | Either::One(_t) |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:59:15 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | match e { |
| | ^ |
| | | |
| | cannot move out of captured variable in an `Fn` closure |
| | help: consider borrowing here: `&e` |
| ... |
| LL | Either::One(_t) => (), |
| | -- data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:63:25 |
| | |
| LL | Either::One(_t) => (), |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:68:25 |
| | |
| LL | let x = X(Y); |
| | - captured outer variable |
| ... |
| LL | let X(mut _t) = x; |
| | ------ ^ |
| | | | |
| | | cannot move out of captured variable in an `Fn` closure |
| | | help: consider borrowing here: `&x` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:68:15 |
| | |
| LL | let X(mut _t) = x; |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:72:38 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | if let Either::One(mut _t) = em { } |
| | ------ ^^ |
| | | | |
| | | cannot move out of captured variable in an `Fn` closure |
| | | help: consider borrowing here: `&em` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:72:28 |
| | |
| LL | if let Either::One(mut _t) = em { } |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:76:41 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | while let Either::One(mut _t) = em { } |
| | ------ ^^ |
| | | | |
| | | cannot move out of captured variable in an `Fn` closure |
| | | help: consider borrowing here: `&em` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:76:31 |
| | |
| LL | while let Either::One(mut _t) = em { } |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:80:15 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | match em { |
| | ^^ |
| | | |
| | cannot move out of captured variable in an `Fn` closure |
| | help: consider borrowing here: `&em` |
| ... |
| LL | Either::One(mut _t) |
| | ------ data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:84:25 |
| | |
| LL | Either::One(mut _t) |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `Fn` closure |
| --> $DIR/move-into-closure.rs:87:15 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | match em { |
| | ^^ |
| | | |
| | cannot move out of captured variable in an `Fn` closure |
| | help: consider borrowing here: `&em` |
| ... |
| LL | Either::One(mut _t) => (), |
| | ------ data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:91:25 |
| | |
| LL | Either::One(mut _t) => (), |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:107:21 |
| | |
| LL | let x = X(Y); |
| | - captured outer variable |
| ... |
| LL | let X(_t) = x; |
| | -- ^ |
| | | | |
| | | cannot move out of captured variable in an `FnMut` closure |
| | | help: consider borrowing here: `&x` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:107:15 |
| | |
| LL | let X(_t) = x; |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:111:34 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | if let Either::One(_t) = e { } |
| | -- ^ |
| | | | |
| | | cannot move out of captured variable in an `FnMut` closure |
| | | help: consider borrowing here: `&e` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:111:28 |
| | |
| LL | if let Either::One(_t) = e { } |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:115:37 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | while let Either::One(_t) = e { } |
| | -- ^ |
| | | | |
| | | cannot move out of captured variable in an `FnMut` closure |
| | | help: consider borrowing here: `&e` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:115:31 |
| | |
| LL | while let Either::One(_t) = e { } |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:119:15 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | match e { |
| | ^ |
| | | |
| | cannot move out of captured variable in an `FnMut` closure |
| | help: consider borrowing here: `&e` |
| ... |
| LL | Either::One(_t) |
| | -- data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:123:25 |
| | |
| LL | Either::One(_t) |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:126:15 |
| | |
| LL | let e = Either::One(X(Y)); |
| | - captured outer variable |
| ... |
| LL | match e { |
| | ^ |
| | | |
| | cannot move out of captured variable in an `FnMut` closure |
| | help: consider borrowing here: `&e` |
| ... |
| LL | Either::One(_t) => (), |
| | -- data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:130:25 |
| | |
| LL | Either::One(_t) => (), |
| | ^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:135:25 |
| | |
| LL | let x = X(Y); |
| | - captured outer variable |
| ... |
| LL | let X(mut _t) = x; |
| | ------ ^ |
| | | | |
| | | cannot move out of captured variable in an `FnMut` closure |
| | | help: consider borrowing here: `&x` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:135:15 |
| | |
| LL | let X(mut _t) = x; |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:139:38 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | if let Either::One(mut _t) = em { } |
| | ------ ^^ |
| | | | |
| | | cannot move out of captured variable in an `FnMut` closure |
| | | help: consider borrowing here: `&em` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:139:28 |
| | |
| LL | if let Either::One(mut _t) = em { } |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:143:41 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | while let Either::One(mut _t) = em { } |
| | ------ ^^ |
| | | | |
| | | cannot move out of captured variable in an `FnMut` closure |
| | | help: consider borrowing here: `&em` |
| | data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:143:31 |
| | |
| LL | while let Either::One(mut _t) = em { } |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:147:15 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | match em { |
| | ^^ |
| | | |
| | cannot move out of captured variable in an `FnMut` closure |
| | help: consider borrowing here: `&em` |
| ... |
| LL | Either::One(mut _t) |
| | ------ data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:151:25 |
| | |
| LL | Either::One(mut _t) |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:154:15 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | match em { |
| | ^^ |
| | | |
| | cannot move out of captured variable in an `FnMut` closure |
| | help: consider borrowing here: `&em` |
| ... |
| LL | Either::One(mut _t) => (), |
| | ------ data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:158:25 |
| | |
| LL | Either::One(mut _t) => (), |
| | ^^^^^^ |
| |
| error[E0507]: cannot move out of captured variable in an `FnMut` closure |
| --> $DIR/move-into-closure.rs:162:15 |
| | |
| LL | let mut em = Either::One(X(Y)); |
| | ------ captured outer variable |
| ... |
| LL | match em { |
| | ^^ |
| | | |
| | cannot move out of captured variable in an `FnMut` closure |
| | help: consider borrowing here: `&em` |
| ... |
| LL | Either::One(mut _t) => (), |
| | ------ data moved here |
| | |
| note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait |
| --> $DIR/move-into-closure.rs:166:25 |
| | |
| LL | Either::One(mut _t) => (), |
| | ^^^^^^ |
| |
| error: aborting due to 21 previous errors |
| |
| For more information about this error, try `rustc --explain E0507`. |