2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:28:9
|
2019-11-11 04:39:52 -06:00
|
|
|
|
|
|
|
|
LL | let ref a @ b = NotCopy;
|
2020-01-18 19:47:01 -06:00
|
|
|
| -----^^^-
|
2019-11-11 04:39:52 -06:00
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2019-11-11 04:39:52 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:31:9
|
2019-11-11 04:39:52 -06:00
|
|
|
|
|
|
|
|
LL | let ref mut a @ b = NotCopy;
|
2020-01-18 19:47:01 -06:00
|
|
|
| ---------^^^-
|
2019-11-11 04:39:52 -06:00
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:36:12
|
|
|
|
|
|
|
|
|
LL | Ok(ref a @ b) | Err(b @ ref a) => {
|
|
|
|
| -----^^^-
|
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2019-11-11 04:39:52 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:36:29
|
2019-11-11 04:39:52 -06:00
|
|
|
|
|
2020-01-18 19:47:01 -06:00
|
|
|
LL | Ok(ref a @ b) | Err(b @ ref a) => {
|
|
|
|
| -^^^-----
|
|
|
|
| | |
|
|
|
|
| | value borrowed here after move
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `b` here
|
2020-01-18 19:47:01 -06:00
|
|
|
| move occurs because `b` has type `main::NotCopy` which does implement the `Copy` trait
|
2019-11-11 04:39:52 -06:00
|
|
|
|
2020-02-02 10:58:15 -06:00
|
|
|
error: cannot move out of value because it is borrowed
|
2020-01-18 19:47:01 -06:00
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:44:9
|
2019-11-11 04:39:52 -06:00
|
|
|
|
|
2020-01-18 19:47:01 -06:00
|
|
|
LL | ref a @ b => {
|
|
|
|
| -----^^^-
|
2019-11-11 04:39:52 -06:00
|
|
|
| | |
|
2020-02-02 10:58:15 -06:00
|
|
|
| | value moved into `b` here
|
|
|
|
| value borrowed, by `a`, here
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error[E0505]: cannot move out of `_` because it is borrowed
|
|
|
|
--> $DIR/default-binding-modes-both-sides-independent.rs:31:21
|
|
|
|
|
|
|
|
|
LL | let ref mut a @ b = NotCopy;
|
|
|
|
| ------------^
|
|
|
|
| | |
|
|
|
|
| | move out of value occurs here
|
|
|
|
| borrow of value occurs here
|
|
|
|
LL |
|
|
|
|
LL | let _a: &NotCopy = a;
|
|
|
|
| - borrow later used here
|
2019-11-11 04:39:52 -06:00
|
|
|
|
2020-01-18 19:47:01 -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 E0505`.
|