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