Files
aji/tests/conformance/source/layer5/reject/missing_effect.aji
T

14 lines
379 B
Rust

// Allocation without the effect: the verifier's E3101 (with suggested_effects).
// expect: reject E3101
// phase: 6
// spec: docs/spec/15-source-language.md
module demo.missingeffect
// AIR twin: phase2/reject/alloc_without_effect.air
fn main(heap: cap<mem.alloc>) -> u64
effects []
{
let x = own.new(1u64, heap) or trap; // diagnostic here: own.new
own.take(move x)
}