15 lines
490 B
Rust
15 lines
490 B
Rust
// task.spawn lacks the explicit task.spawn effect; the selected missing effect and complete suggested list agree.
|
|
// expect: reject E3101
|
|
// phase: 6
|
|
// spec: docs/spec/04-concurrency-and-atomics.md §33
|
|
// AIR twin: phase3/reject/tasks_spawn_without_effect.air
|
|
module test.source_spawn_without_effect
|
|
fn noop() -> void effects [] {}
|
|
fn main() -> u64 effects [] {
|
|
scope sc {
|
|
let t = task.spawn(sc, noop); // diagnostic here: task.spawn
|
|
task.join(move t);
|
|
}
|
|
0
|
|
}
|