Files
aji/tests/conformance/source/layer34/reject/borrow_conflict.aji
T

16 lines
369 B
Rust

// The frontend does not check aliasing: the verifier reports E2101 at the second borrow.
// expect: reject E2101
// phase: 6
// spec: docs/spec/15-source-language.md
// AIR twin: phase1/reject/mut_and_shared.air
module demo.conflict
fn main() -> u64
effects []
{
var buf: [u64; 2] = zero;
mut a = buf;
ref b = buf; // diagnostic here: ref
return 0;
}