2023-10-28 23:11:52 -05:00
|
|
|
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
|
2023-10-28 23:15:36 -05:00
|
|
|
--> $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
|
2023-10-28 23:11:52 -05:00
|
|
|
|
|
|
|
|
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
|
2023-10-28 23:15:36 -05:00
|
|
|
--> $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
|
2023-10-28 23:11:52 -05:00
|
|
|
|
|
|
|
|
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
|
2023-10-28 23:15:36 -05:00
|
|
|
--> $DIR/conflicting_bindings.rs:21:24
|
2023-10-28 23:11:52 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-10-28 23:15:36 -05:00
|
|
|
error: aborting due to 8 previous errors
|
2023-10-28 23:11:52 -05:00
|
|
|
|