//# publish module 0x1.M { struct G has drop { v1: u64, v2: u64 } struct S { g1: Self.G, g2: Self.G } t1(root: &mut Self.S, cond: bool) { let v1_mut: &mut u64; let v2_mut: &mut u64; let g2_mut: &mut Self.G; label b0: v1_mut = &mut (&mut copy(root).S::g1).G::v1; v2_mut = &mut (&mut copy(root).S::g1).G::v2; g2_mut = &mut copy(root).S::g2; // all writes valid as they are on different fields/subtrees *copy(g2_mut) = G { v1: 0, v2: 0 }; *copy(v2_mut) = 0; *copy(v1_mut) = 1; return; } }