error[E0502]: cannot borrow `u.y` as immutable because `u.x.0` is also borrowed as mutable <del> --> $DIR/union-borrow-move-parent-sibling.rs:23:14 </del> <ins> --> $DIR/union-borrow-move-parent-sibling.rs:25:14 </ins> | LL |     let a = &mut u.x.0; |                  ----- mutable borrow occurs here <del> LL |     let a = &u.y; //~ ERROR cannot borrow `u.y` </del> <ins> LL |     let b = &u.y; //~ ERROR cannot borrow `u.y` </ins> |              ^^^ immutable borrow occurs here <ins> LL |     use_borrow(a); </ins> LL | } | - mutable borrow ends here error[E0382]: use of moved value: `u.y` <del> --> $DIR/union-borrow-move-parent-sibling.rs:29:9 </del> <ins> --> $DIR/union-borrow-move-parent-sibling.rs:32:9 </ins> | LL |     let a = u.x.0; |         - value moved here <del> LL |     let a = u.y; //~ ERROR use of moved value: `u.y` </del> <ins> LL |     let b = u.y; //~ ERROR use of moved value: `u.y` </ins> |         ^ value used here after move | = note: move occurs because `u.y` has type `[type error]`, which does not implement the `Copy` trait error[E0502]: cannot borrow `u.y` as immutable because `u.x.0.0` is also borrowed as mutable <del> --> $DIR/union-borrow-move-parent-sibling.rs:35:14 </del> <ins> --> $DIR/union-borrow-move-parent-sibling.rs:38:14 </ins> | LL |     let a = &mut (u.x.0).0; |                  --------- mutable borrow occurs here <del> LL |     let a = &u.y; //~ ERROR cannot borrow `u.y` </del> <ins> LL |     let b = &u.y; //~ ERROR cannot borrow `u.y` </ins> |              ^^^ immutable borrow occurs here <ins> LL |     use_borrow(a); </ins> LL | } | - mutable borrow ends here error[E0382]: use of moved value: `u.y` <del> --> $DIR/union-borrow-move-parent-sibling.rs:41:9 </del> <ins> --> $DIR/union-borrow-move-parent-sibling.rs:45:9 </ins> | LL |     let a = (u.x.0).0; |         - value moved here <del> LL |     let a = u.y; //~ ERROR use of moved value: `u.y` </del> <ins> LL |     let b = u.y; //~ ERROR use of moved value: `u.y` </ins> |         ^ value used here after move | = note: move occurs because `u.y` has type `[type error]`, which does not implement the `Copy` trait error[E0502]: cannot borrow `u` (via `u.x`) as immutable because `u` is also borrowed as mutable (via `*u.y`) <del> --> $DIR/union-borrow-move-parent-sibling.rs:47:14 </del> <ins> --> $DIR/union-borrow-move-parent-sibling.rs:51:14 </ins> | LL |     let a = &mut *u.y; |                  ---- mutable borrow occurs here (via `*u.y`) <del> LL |     let a = &u.x; //~ ERROR cannot borrow `u` (via `u.x`) </del> <ins> LL |     let b = &u.x; //~ ERROR cannot borrow `u` (via `u.x`) </ins> |              ^^^ immutable borrow occurs here (via `u.x`) <ins> LL |     use_borrow(a); </ins> LL | } | - mutable borrow ends here error[E0382]: use of moved value: `u.x` <del> --> $DIR/union-borrow-move-parent-sibling.rs:53:9 </del> <ins> --> $DIR/union-borrow-move-parent-sibling.rs:58:9 </ins> | LL |     let a = *u.y; |         - value moved here <del> LL |     let a = u.x; //~ ERROR use of moved value: `u.x` </del> <ins> LL |     let b = u.x; //~ ERROR use of moved value: `u.x` </ins> |         ^ value used here after move | = note: move occurs because `u.x` has type `[type error]`, which does not implement the `Copy` trait