diag: add factual related borrow and task locations

This commit is contained in:
dev committed 2026-10-07 19:12:58 +03:00
1 parent dbd9763713
commit 8ee0f4c2bf
27 files changed
+659 -18

No files matched your search

@@ -0,0 +1,11 @@
// expect: run
// result: 2
// phase: 6
// spec: docs/spec/10-diagnostics-and-agent-protocol.md §2
module related.valid
fn main() -> u64 effects [] {
var data: [u64; 1] = [1u64];
{ ref view = data; assert(view[0] == 1u64); }
data[0] = 2u64;
return data[0];
}
@@ -0,0 +1,10 @@
// expect: reject E2101
// phase: 6
// spec: docs/spec/10-diagnostics-and-agent-protocol.md §2
module related.rejected
fn main() -> u64 effects [] {
var data: [u64; 1] = [1u64];
ref view = data;
data[0] = 2u64;
return view[0];
}