// expect: run // result: 42 // grant: heap=mem.alloc:8 // phase: 6 // spec: docs/spec/15-source-language.md §8, §9 module test.effects.allocation fn main(heap: cap) -> u64 effects [mem.alloc] { let value = own.new(42u64, heap) or trap; return own.take(move value); }