; A guard passed through a block argument still depends on the mutex borrow it was locked through; ending that borrow while the guard is live is rejected. ; expect: reject E2102 ; phase: 3 ; spec: docs/spec/04-concurrency-and-atomics.md ยง40 module test.cfg_provenance_guard_parent air 0 lang 0.1 features [cancellation, effects, ownership, sync, tasks] fn @main() -> u64 effects [task.wait] entry: %z = const.u64 0 %m = mutex.make %z %mr = borrow.ref %m mutex.lock %mr, ok -> @locked, cancelled -> @out locked(%g: guard): br @next(%g) next(%g2: guard): borrow.end %mr mutex.unlock %g2 %v = mutex.take %m ret %v out: borrow.end %mr %w = mutex.take %m ret %w