// task.spawn spawns into a scope bound by `scope s { … }`. // expect: reject E7005 // phase: 6 // spec: docs/spec/15-source-language.md module demo.spawn_outside_scope fn work() -> u64 effects [] { 1 } fn main() -> u64 effects [task.spawn] { let s = 0u64; let t = task.spawn(s, work); task.join(move t) }