2020-02-02 16:58:15 +00:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-18 04:14:06 +00:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:26:9
|
2019-11-11 10:39:52 +00:00
|
|
|
|
|
|
|
|
LL | let ref a @ b = NotCopy;
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 12:48:43 +00:00
|
|
|
| value is borrowed by `a` here
|
2019-11-11 10:39:52 +00:00
|
|
|
|
2020-02-02 16:58:15 +00:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-18 04:14:06 +00:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:29:9
|
2019-11-11 10:39:52 +00:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ b = NotCopy;
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^^^^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 12:48:43 +00:00
|
|
|
| value is mutably borrowed by `a` here
|
2020-01-19 01:47:01 +00:00
|
|
|
|
2020-02-02 16:58:15 +00:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-18 04:14:06 +00:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:34:12
|
2020-01-19 01:47:01 +00:00
|
|
|
|
|
|
|
|
LL | Ok(ref a @ b) | Err(b @ ref a) => {
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 12:48:43 +00:00
|
|
|
| value is borrowed by `a` here
|
2019-11-11 10:39:52 +00:00
|
|
|
|
2020-02-02 16:58:15 +00:00
|
|
|
error: borrow of moved value
|
2021-05-18 04:14:06 +00:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:34:29
|
2019-11-11 10:39:52 +00:00
|
|
|
|
|
2020-01-19 01:47:01 +00:00
|
|
|
LL | Ok(ref a @ b) | Err(b @ ref a) => {
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 16:58:15 +00:00
|
|
|
| value moved into `b` here
|
2020-09-02 07:40:56 +00:00
|
|
|
| move occurs because `b` has type `NotCopy` which does not implement the `Copy` trait
|
2022-11-15 17:01:20 +00:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | Ok(ref a @ b) | Err(ref b @ ref a) => {
|
|
|
|
| +++
|
2019-11-11 10:39:52 +00:00
|
|
|
|
2020-02-02 16:58:15 +00:00
|
|
|
error: cannot move out of value because it is borrowed
|
2021-05-18 04:14:06 +00:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:42:9
|
2019-11-11 10:39:52 +00:00
|
|
|
|
|
2020-01-19 01:47:01 +00:00
|
|
|
LL | ref a @ b => {
|
2023-02-27 17:39:02 +00:00
|
|
|
| ^^^^^ - value is moved into `b` here
|
|
|
|
| |
|
2023-01-17 12:48:43 +00:00
|
|
|
| value is borrowed by `a` here
|
2020-01-19 01:47:01 +00:00
|
|
|
|
2020-11-01 18:35:55 +00:00
|
|
|
error[E0382]: borrow of moved value
|
2021-05-18 04:14:06 +00:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:29:9
|
2020-01-19 01:47:01 +00:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ b = NotCopy;
|
2022-09-03 22:55:53 +00:00
|
|
|
| ^^^^^^^^^ - ------- move occurs because value has type `NotCopy`, which does not implement the `Copy` trait
|
2020-01-19 01:47:01 +00:00
|
|
|
| | |
|
2020-11-01 18:35:55 +00:00
|
|
|
| | value moved here
|
|
|
|
| value borrowed here after move
|
2022-11-03 04:22:24 +00:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref mut a @ ref b = NotCopy;
|
|
|
|
| +++
|
2019-11-11 10:39:52 +00:00
|
|
|
|
2020-01-19 01:47:01 +00:00
|
|
|
error: aborting due to 6 previous errors
|
2019-11-11 10:39:52 +00:00
|
|
|
|
2020-11-01 18:35:55 +00:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|