2019-11-22 23:15:11 +00:00
|
|
|
error[E0382]: borrow of moved value: `a[..]`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:10:14
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, _x] = a;
|
|
|
|
| -- value moved here
|
|
|
|
LL | let [.., ref _y] = a;
|
|
|
|
| ^^^^^^ value borrowed here after move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, ref _x] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: borrow of partially moved value: `a[..]`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:16:14
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, (_x, _)] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [.., ref _y] = a;
|
|
|
|
| ^^^^^^ value borrowed here after partial move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, (ref _x, _)] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value: `a[..].0`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:22:15
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, (_x, _)] = a;
|
|
|
|
| -- value moved here
|
|
|
|
LL | let [.., (ref _y, _)] = a;
|
|
|
|
| ^^^^^^ value borrowed here after move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, (ref _x, _)] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: borrow of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:30:10
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_x, _, _] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [ref _y @ .., _, _] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| ^^^^^^ value borrowed here after partial move
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [ref _x, _, _] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: borrow of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:36:16
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [.., _x] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [_, _, ref _y @ ..] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| ^^^^^^ value borrowed here after partial move
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [.., ref _x] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: borrow of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:42:10
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [(_x, _), _, _] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [ref _y @ .., _, _] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| ^^^^^^ value borrowed here after partial move
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [(ref _x, _), _, _] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: borrow of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:48:16
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [.., (_x, _)] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [_, _, ref _y @ ..] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| ^^^^^^ value borrowed here after partial move
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [.., (ref _x, _)] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value: `a[..]`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:54:11
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_y @ .., _, _] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| -- value moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [(ref _x, _), _, _] = a;
|
|
|
|
| ^^^^^^ value borrowed here after move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [ref _y @ .., _, _] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value: `a[..]`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:60:15
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, _y @ ..] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| -- value moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [.., (ref _x, _)] = a;
|
|
|
|
| ^^^^^^ value borrowed here after move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, ref _y @ ..] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: borrow of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:68:13
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [x @ .., _] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| - value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | let [_, ref _y @ ..] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| ^^^^^^ value borrowed here after partial move
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [ref x @ .., _] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: use of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:76:5
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, _x] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | a[2] = Default::default();
|
|
|
|
| ^^^^ value used here after partial move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, ref _x] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: use of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:82:5
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, (_x, _)] = a;
|
2020-08-08 17:16:43 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | a[2].1 = Default::default();
|
|
|
|
| ^^^^ value used here after partial move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, (ref _x, _)] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: use of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:88:5
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, _x @ ..] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | a[0] = Default::default();
|
|
|
|
| ^^^^ value used here after partial move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, ref _x @ ..] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
2020-08-08 17:16:43 +00:00
|
|
|
error[E0382]: use of partially moved value: `a`
|
2019-12-30 00:23:42 +00:00
|
|
|
--> $DIR/borrowck-move-out-from-array-use.rs:94:5
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
|
LL | let [_, _, _x @ ..] = a;
|
2022-09-03 22:55:53 +00:00
|
|
|
| -- value partially moved here
|
2019-11-22 23:15:11 +00:00
|
|
|
LL | a[0].1 = Default::default();
|
|
|
|
| ^^^^ value used here after partial move
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
|
2022-11-03 04:22:24 +00:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let [_, _, ref _x @ ..] = a;
|
|
|
|
| +++
|
2019-11-22 23:15:11 +00:00
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|