//# publish module 0x1.Token { import 0x1.signer; struct T has key {v: u64} public new(v: u64): Self.T { label b0: return T{v: move(v)}; } public value(this: &Self.T): u64 { let vref: &u64; let res: u64; label b0: vref = &move(this).T::v; // T does not have copy res = *move(vref); return move(res); } public exists(addr: address): bool { let yes: bool; label b0: yes = exists(move(addr)); return move(yes); } public publish(account: &signer, t: Self.T) { label b0: move_to(move(account), move(t)); return; } public test(account: &signer) acquires T { let addr: address; let t: Self.T; let tref: &mut Self.T; let y: Self.T; label b0: addr = signer.address_of(copy(account)); t = Self.new(0); Self.publish(copy(account), move(t)); tref = borrow_global_mut(move(addr)); y = *move(tref); return; } }