// A `select` arm handles both of its outcomes. // expect: reject E7004 // phase: 6 // spec: docs/spec/15-source-language.md module demo.select_missing_outcome fn main(heap: cap) -> u64 effects [mem.alloc, task.wait] { match channel.make(1, heap) { ok(tx, rx) => { channel.close_sender(move tx); select { recv(rx) { ok(x) => {} } cancelled => {} } channel.close_receiver(move rx) or trap; 0 } err(e) => { trap; } } }