11 lines
451 B
Rust
11 lines
451 B
Rust
// channel.recv lacks task.wait on a borrowed receiver parameter; no allocation adds another missing effect.
|
|
// expect: reject E3101
|
|
// phase: 6
|
|
// spec: docs/spec/04-concurrency-and-atomics.md
|
|
// AIR twin: phase3/reject/channels_recv_without_effect.air
|
|
module test.source_recv_without_effect
|
|
fn f(rx: mut<receiver<u64>>) -> u64 effects [] {
|
|
channel.recv(rx) or trap // diagnostic here: channel.recv
|
|
}
|
|
fn main() -> u64 effects [] { return 0u64; }
|