Files
aji/tests/conformance/source/reject_twins/island_content.aji
T

15 lines
461 B
Rust

// An island result contains atomic<u64>, a foreign mutable edge forbidden by IslandSafe.
// expect: reject E2111
// phase: 6
// spec: docs/spec/03-memory-model.md §22
// AIR twin: phase5/reject/island_content.air
module test.source_island_content
fn main(heap: cap<mem.alloc>) -> u64
effects [mem.alloc]
{
let c = atomic.new(0u64);
let isl = island.create(move c, heap) or trap; // diagnostic here: island.create
island.destroy(move isl);
0
}