//# publish module 0x1.M { import 0x1.signer; struct R has key { x: bool } public init(s: &signer) { label b0: move_to(move(s), R { x: false }); return; } public test(s: &signer) acquires R { let r: Self.R; label b0: r = move_from(signer.address_of(copy(s))); move_to(move(s), move(r)); return; } } //# run --signers 0x1 import 0x1.M; main(s: signer) { label b0: M.init(&s); return; } //# view --address 0x1 --resource 0x1::M::R //# run --signers 0x1 import 0x1.M; main(s: signer) { label b0: M.test(&s); return; } //# view --address 0x1 --resource 0x1::M::R