blob: 3d42dcb52f5db1966810ef67f5269a04c6b22b21 [file] [log] [blame]
error[E0499]: cannot borrow `x` (via `x.b`) as mutable more than once at a time
--> $DIR/issue-17263.rs:17:34
|
LL | let (a, b) = (&mut x.a, &mut x.b);
| --- ^^^ second mutable borrow occurs here (via `x.b`)
| |
| first mutable borrow occurs here (via `x.a`)
...
LL | }
| - first borrow ends here
error[E0502]: cannot borrow `foo` (via `foo.b`) as immutable because `foo` is also borrowed as mutable (via `foo.a`)
--> $DIR/issue-17263.rs:21:32
|
LL | let (c, d) = (&mut foo.a, &foo.b);
| ----- ^^^^^ immutable borrow occurs here (via `foo.b`)
| |
| mutable borrow occurs here (via `foo.a`)
...
LL | }
| - mutable borrow ends here
error: aborting due to 2 previous errors
Some errors occurred: E0499, E0502.
For more information about an error, try `rustc --explain E0499`.