2020-02-02 17:58:15 +01:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:14
|
2019-11-11 11:39:52 +01:00
|
|
|
|
|
2020-01-19 02:47:01 +01:00
|
|
|
LL | Some(ref _y @ _z) => {}
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^^^^^ -- value is moved into `_z` here
|
|
|
|
| |
|
2023-01-17 13:48:43 +01:00
|
|
|
| value is borrowed by `_y` here
|
2019-11-11 11:39:52 +01:00
|
|
|
|
2020-02-02 17:58:15 +01:00
|
|
|
error: borrow of moved value
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:14
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
2020-01-19 02:47:01 +01:00
|
|
|
LL | Some(_z @ ref _y) => {}
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^ ------ value borrowed here after move
|
|
|
|
| |
|
2020-02-02 17:58:15 +01:00
|
|
|
| value moved into `_z` here
|
2020-02-21 14:49:51 +01:00
|
|
|
| move occurs because `_z` has type `X` which does not implement the `Copy` trait
|
2022-11-15 09:01:20 -08:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | Some(ref _z @ ref _y) => {}
|
|
|
|
| +++
|
2019-12-15 04:09:47 +01:00
|
|
|
|
2020-02-02 17:58:15 +01:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
2020-01-19 02:47:01 +01:00
|
|
|
LL | Some(ref mut _y @ _z) => {}
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^^^^^^^^^ -- value is moved into `_z` here
|
|
|
|
| |
|
2023-01-17 13:48:43 +01:00
|
|
|
| value is mutably borrowed by `_y` here
|
2019-12-15 04:09:47 +01:00
|
|
|
|
2020-02-02 17:58:15 +01:00
|
|
|
error: borrow of moved value
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:33:14
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
2020-01-19 02:47:01 +01:00
|
|
|
LL | Some(_z @ ref mut _y) => {}
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^ ---------- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 17:58:15 +01:00
|
|
|
| value moved into `_z` here
|
2020-02-21 14:49:51 +01:00
|
|
|
| move occurs because `_z` has type `X` which does not implement the `Copy` trait
|
2022-11-15 09:01:20 -08:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | Some(ref _z @ ref mut _y) => {}
|
|
|
|
| +++
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:14
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
2020-11-02 00:05:55 +05:30
|
|
|
LL | Some(ref _y @ _z) => {}
|
2022-09-04 00:55:53 +02:00
|
|
|
| ^^^^^^ -- value moved here
|
|
|
|
| |
|
2020-11-02 00:05:55 +05:30
|
|
|
| value borrowed here after move
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
|
|
|
= note: move occurs because value has type `X`, which does not implement the `Copy` trait
|
2022-11-02 21:22:24 -07:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
2020-06-19 22:45:09 -07:00
|
|
|
|
|
2020-11-02 00:05:55 +05:30
|
|
|
LL | Some(ref _y @ ref _z) => {}
|
2021-06-21 19:07:19 -07:00
|
|
|
| +++
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
|
|
error[E0382]: borrow of moved value
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
2020-11-02 00:05:55 +05:30
|
|
|
LL | Some(ref mut _y @ _z) => {}
|
2022-09-04 00:55:53 +02:00
|
|
|
| ^^^^^^^^^^ -- value moved here
|
|
|
|
| |
|
2020-11-02 00:05:55 +05:30
|
|
|
| value borrowed here after move
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
|
|
|
= note: move occurs because value has type `X`, which does not implement the `Copy` trait
|
2022-11-02 21:22:24 -07:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
2020-06-19 22:45:09 -07:00
|
|
|
|
|
2020-11-02 00:05:55 +05:30
|
|
|
LL | Some(ref mut _y @ ref _z) => {}
|
2021-06-21 19:07:19 -07:00
|
|
|
| +++
|
2019-12-15 04:09:47 +01:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2019-11-11 11:39:52 +01:00
|
|
|
|
2020-01-19 02:47:01 +01:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|