blob: f19fed0891740604b5abcb1b3f70c280505eee44 [file] [log] [blame]
error[E0382]: borrow of moved value: `tup0`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:31:10
|
LL | let mut tup0 = (S, S);
| -------- move occurs because `tup0` has type `(S, S)`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
LL | // Tuples...
LL | let (ref mut borrow, mov) = tup0;
| ---- variable moved due to use in closure
...
LL | drop(&tup0);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup1`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:32:10
|
LL | let mut tup1 = (S, S, S);
| -------- move occurs because `tup1` has type `(S, S, S)`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let (mov, _, ref mut borrow) = tup1;
| ---- variable moved due to use in closure
...
LL | drop(&tup1);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup2`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:33:10
|
LL | let tup2 = (S, S);
| ---- move occurs because `tup2` has type `(S, S)`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let (ref borrow, mov) = tup2;
| ---- variable moved due to use in closure
...
LL | drop(&tup2);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup3`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:34:10
|
LL | let tup3 = (S, S, S);
| ---- move occurs because `tup3` has type `(S, S, S)`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let (mov, _, ref borrow) = tup3;
| ---- variable moved due to use in closure
...
LL | drop(&tup3);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup4`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:39:10
|
LL | let tup4 = (S, S);
| ---- move occurs because `tup4` has type `(S, S)`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let (ref borrow, mov) = tup4;
| ---- variable moved due to use in closure
...
LL | drop(&tup4.0);
| ^^^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr0`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:41:10
|
LL | let mut arr0 = [S, S, S];
| -------- move occurs because `arr0` has type `[S; 3]`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let [mov @ .., ref borrow] = arr0;
| ---- variable moved due to use in closure
...
LL | drop(&arr0);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr1`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:42:36
|
LL | let mut arr1 = [S, S, S, S, S];
| -------- move occurs because `arr1` has type `[S; 5]`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let [_, ref mut borrow @ .., _, mov] = arr1;
| ---- variable moved due to use in closure
...
LL | let [_, mov1, mov2, mov3, _] = &arr1;
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr2`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:43:10
|
LL | let arr2 = [S, S, S];
| ---- move occurs because `arr2` has type `[S; 3]`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let [mov @ .., ref borrow] = arr2;
| ---- variable moved due to use in closure
...
LL | drop(&arr2);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr3`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:44:36
|
LL | let arr3 = [S, S, S, S, S];
| ---- move occurs because `arr3` has type `[S; 5]`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | let [_, ref borrow @ .., _, mov] = arr3;
| ---- variable moved due to use in closure
...
LL | let [_, mov1, mov2, mov3, _] = &arr3;
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup0`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:75:10
|
LL | let mut tup0: Option<(S, S)> = None;
| -------- move occurs because `tup0` has type `Option<(S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
LL | m!((ref mut borrow, mov) = tup0);
| ---- variable moved due to use in closure
...
LL | drop(&tup0);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup1`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:76:10
|
LL | let mut tup1: Option<(S, S, S)> = None;
| -------- move occurs because `tup1` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
LL | m!((ref mut borrow, mov) = tup0);
LL | m!((mov, _, ref mut borrow) = tup1);
| ---- variable moved due to use in closure
...
LL | drop(&tup1);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup2`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:77:10
|
LL | let tup2: Option<(S, S)> = None;
| ---- move occurs because `tup2` has type `Option<(S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!((ref borrow, mov) = tup2);
| ---- variable moved due to use in closure
...
LL | drop(&tup2);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup3`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:78:10
|
LL | let tup3: Option<(S, S, S)> = None;
| ---- move occurs because `tup3` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!((mov, _, ref borrow) = tup3);
| ---- variable moved due to use in closure
...
LL | drop(&tup3);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup4`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:79:21
|
LL | let tup4: Option<(S, S)> = None;
| ---- move occurs because `tup4` has type `Option<(S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!((ref borrow, mov) = tup4);
| ---- variable moved due to use in closure
...
LL | m!((ref x, _) = &tup4);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr0`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:80:10
|
LL | let mut arr0: Option<[S; 3]> = None;
| -------- move occurs because `arr0` has type `Option<[S; 3]>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([mov @ .., ref borrow] = arr0);
| ---- variable moved due to use in closure
...
LL | drop(&arr0);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr1`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:81:35
|
LL | let mut arr1: Option<[S; 5]> = None;
| -------- move occurs because `arr1` has type `Option<[S; 5]>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([_, ref mut borrow @ .., _, mov] = arr1);
| ---- variable moved due to use in closure
...
LL | m!([_, mov1, mov2, mov3, _] = &arr1);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr2`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:82:10
|
LL | let arr2: Option<[S; 3]> = None;
| ---- move occurs because `arr2` has type `Option<[S; 3]>`, which does not implement the `Copy` trait
LL | let arr3: Option<[S; 5]> = None;
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([mov @ .., ref borrow] = arr2);
| ---- variable moved due to use in closure
...
LL | drop(&arr2);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr3`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:83:35
|
LL | let arr3: Option<[S; 5]> = None;
| ---- move occurs because `arr3` has type `Option<[S; 5]>`, which does not implement the `Copy` trait
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([_, ref borrow @ .., _, mov] = arr3);
| ---- variable moved due to use in closure
...
LL | m!([_, mov1, mov2, mov3, _] = &arr3);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup0`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:111:10
|
LL | let mut tup0: Option<(S, S)> = None;
| -------- move occurs because `tup0` has type `Option<(S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
LL | m!((ref mut borrow, mov) = tup0);
| ---- variable moved due to use in closure
...
LL | drop(&tup0);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup1`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:112:10
|
LL | let mut tup1: Option<(S, S, S)> = None;
| -------- move occurs because `tup1` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
LL | m!((ref mut borrow, mov) = tup0);
LL | m!((mov, _, ref mut borrow) = tup1);
| ---- variable moved due to use in closure
...
LL | drop(&tup1);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup2`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:113:10
|
LL | let tup2: Option<(S, S)> = None;
| ---- move occurs because `tup2` has type `Option<(S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!((ref borrow, mov) = tup2);
| ---- variable moved due to use in closure
...
LL | drop(&tup2);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup3`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:114:10
|
LL | let tup3: Option<(S, S, S)> = None;
| ---- move occurs because `tup3` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!((mov, _, ref borrow) = tup3);
| ---- variable moved due to use in closure
...
LL | drop(&tup3);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `tup4`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:115:21
|
LL | let tup4: Option<(S, S)> = None;
| ---- move occurs because `tup4` has type `Option<(S, S)>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!((ref borrow, mov) = tup4);
| ---- variable moved due to use in closure
...
LL | m!((ref x, _) = &tup4);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr0`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:116:10
|
LL | let mut arr0: Option<[S; 3]> = None;
| -------- move occurs because `arr0` has type `Option<[S; 3]>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([mov @ .., ref borrow] = arr0);
| ---- variable moved due to use in closure
...
LL | drop(&arr0);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr1`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:117:35
|
LL | let mut arr1: Option<[S; 5]> = None;
| -------- move occurs because `arr1` has type `Option<[S; 5]>`, which does not implement the `Copy` trait
...
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([_, ref mut borrow @ .., _, mov] = arr1);
| ---- variable moved due to use in closure
...
LL | m!([_, mov1, mov2, mov3, _] = &arr1);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr2`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:118:10
|
LL | let arr2: Option<[S; 3]> = None;
| ---- move occurs because `arr2` has type `Option<[S; 3]>`, which does not implement the `Copy` trait
LL | let arr3: Option<[S; 5]> = None;
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([mov @ .., ref borrow] = arr2);
| ---- variable moved due to use in closure
...
LL | drop(&arr2);
| ^^^^^ value borrowed here after move
error[E0382]: borrow of moved value: `arr3`
--> $DIR/move-ref-patterns-closure-captures-inside.rs:119:35
|
LL | let arr3: Option<[S; 5]> = None;
| ---- move occurs because `arr3` has type `Option<[S; 5]>`, which does not implement the `Copy` trait
LL | let mut closure = || {
| -- value moved into closure here
...
LL | m!([_, ref borrow @ .., _, mov] = arr3);
| ---- variable moved due to use in closure
...
LL | m!([_, mov1, mov2, mov3, _] = &arr3);
| ^^^^^ value borrowed here after move
error: aborting due to 27 previous errors
For more information about this error, try `rustc --explain E0382`.