12 lines
381 B
Rust
12 lines
381 B
Rust
// The caller does not declare the effect of its callee.
|
|
// phase: 6
|
|
// spec: docs/spec/05-effects-and-capabilities.md §9.3
|
|
// expect: reject E3101
|
|
// AIR twin: phase2/reject/undeclared_effect.air
|
|
module test.source_undeclared_effect
|
|
fn emit() -> void effects [io.write] {}
|
|
fn f() -> void effects [] {
|
|
emit(); // diagnostic here
|
|
}
|
|
fn main() -> u64 effects [] { return 0u64; }
|