From c134c59004175375e74b19216040078c6cbeb3c1 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 26 Feb 2026 01:30:36 +0200 Subject: add comment about hole in my assumptions --- examples/vec.fwd | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/vec.fwd') diff --git a/examples/vec.fwd b/examples/vec.fwd index bd88091..903c3e7 100644 --- a/examples/vec.fwd +++ b/examples/vec.fwd @@ -124,6 +124,10 @@ check_vec(i64 i, i64 n, vec v, (vec) ok) if i < n { at_vec(v, i as u64) => v, elem; + /* oh, this doesn't really work with the memory analysis, since + * I can destroy `v` but `elem` is still usable. I guess I could + * transform this such that `elem` is only alive within a + * closure? Not sure. */ guard(elem* == i) => { destroy_vec(v); fwdpanic("check_vec, vec built wrong\n"); -- cgit v1.2.3