mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:5:9
|
|
|
|
|
LL | let ref mut y @ ref mut z = x;
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:7:14
|
|
|
|
|
LL | let Some(ref mut y @ ref mut z) = x else { return };
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:9:17
|
|
|
|
|
LL | if let Some(ref mut y @ ref mut z) = x {}
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:11:17
|
|
|
|
|
LL | if let Some(ref mut y @ ref mut z) = x && true {}
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:13:20
|
|
|
|
|
LL | while let Some(ref mut y @ ref mut z) = x {}
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:15:20
|
|
|
|
|
LL | while let Some(ref mut y @ ref mut z) = x && true {}
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:18:9
|
|
|
|
|
LL | ref mut y @ ref mut z => {}
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: cannot borrow value as mutable more than once at a time
|
|
--> $DIR/conflicting_bindings.rs:21:24
|
|
|
|
|
LL | () if let Some(ref mut y @ ref mut z) = x => {}
|
|
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
|
|
| |
|
|
| value is mutably borrowed by `y` here
|
|
|
|
error: aborting due to 8 previous errors
|
|
|