; After mutex.take the mutex is dead: borrowing it again is a use after consumption (as after own.take). ; expect: reject E3001 ; phase: 3 ; spec: docs/spec/04-concurrency-and-atomics.md module test.sync_use_after_take air 0 lang 0.1 features [cancellation, effects, ownership, sync, tasks] fn @f() -> u64 effects [] entry: %z = const.u64 0 %m = mutex.make %z %v = mutex.take %m %mr = borrow.ref %m borrow.end %mr ret %v