module 0x42::M { struct NoAbilities { } struct HasDrop has drop { a: T2 } struct HasCopy has copy { a: T2 } struct HasStore has store { a: T2} struct HasKey has key { a : T2 } struct RequireStore { a: T } // Writing to a references requires drop fun f1(ref: &mut HasDrop) { *ref = HasDrop { a: NoAbilities { } }; } // Ignoring values requires drop fun f2() { _ = HasDrop { a: NoAbilities { } }; } // Leaving value in local requires drop fun f3(_x: HasDrop) { } // `copy` requires copy fun f4(x: HasCopy): (HasCopy, HasCopy) { (copy x, x) } // `move_to` requires key fun f5(s: &signer, x: HasKey) { move_to>(s, x); } // `move_from` requires key fun f6(): HasKey acquires HasKey { move_from>(@0x0) } // `exists` requires key fun f7(): bool { exists>(@0x0) } // Explicit store constraint fun f8(): RequireStore> { RequireStore> { a: HasStore { a: NoAbilities {} } } } }