//# publish module 0x1.M { struct X has drop { f: Self.Y } struct Y has drop { g: u64, h: u64 } // tests deep borrows + releases t1() { let x: Self.X; let ref_x: &mut Self.X; let ref_x_f: &mut Self.Y; let ref_x_f_g: &mut u64; let ref_x_f_h: &mut u64; label b0: x = X { f: Y { g: 0, h: 0 } }; ref_x = &mut x; ref_x_f = &mut move(ref_x).X::f; ref_x_f_g = &mut move(ref_x_f).Y::g; ref_x = &mut x; ref_x_f = &mut move(ref_x).X::f; ref_x_f_h = &mut move(ref_x_f).Y::h; *copy(ref_x_f_g) = *copy(ref_x_f_h); *copy(ref_x_f_h) = *copy(ref_x_f_g); Self.foo(move(ref_x_f_g), move(ref_x_f_h)); return; } foo(a: &mut u64, b: &mut u64) { label b0: return; } }