19 lines
504 B
Rust
19 lines
504 B
Rust
// expect: reject E0006
|
|
// phase: 6
|
|
// spec: docs/spec/04-concurrency-and-atomics.md §38.1; docs/spec/15-source-language.md §10
|
|
// AIR twin: phase3/reject/channels_endpoint_element.air
|
|
module test.channels_endpoint_element
|
|
|
|
fn f(heap: cap<mem.alloc>) -> void effects [mem.alloc] {
|
|
match channel.make<sender<u64>>(1, heap) { // diagnostic here: channel.make
|
|
ok(tx, rx) => {
|
|
trap;
|
|
}
|
|
err(e) => {
|
|
trap;
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() -> void effects [] {}
|