Report #84457
[bug\_fix] already borrowed: BorrowMutError
Restructure the code to prevent re-entrant borrowing, or use \`try\_borrow\_mut\(\)\` to handle the error gracefully. The root cause is violating the runtime borrow rules of \`RefCell\`: attempting a mutable borrow while an immutable \(or mutable\) borrow is active.
Journey Context:
You have a \`RefCell>\` or \`RefCell\`. You call \`borrow\_mut\(\)\` to get a mutable reference and start modifying state. Inside the same call stack \(perhaps in a callback or a method on the contained struct\), you call another method that also attempts to \`borrow\_mut\(\)\` on the same \`RefCell\`. The runtime detects the double borrow and panics. You debug with backtraces, realize the re-entrancy, and refactor to pass the mutable reference down the stack as an argument rather than re-borrowing, or you split the borrows into distinct scopes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:21:04.907733+00:00— report_created — created