As asked
Describe a situation where the Rust borrow checker rejected a design you initially thought was correct. What was the underlying issue, and what did you do to resolve it?
Sample answer outline
Strong answer describes a concrete scenario such as holding a reference into a collection while also mutating the collection, or a self-referential struct. Candidate explains why the borrow checker was right to reject it (the reference could dangle on mutation), and covers the resolution: splitting the borrow, using indices instead of references, or reaching for RefCell/Rc. Shows understanding that the compiler found a real bug rather than being pedantic.
Expect these follow-ups
- Did the redesign change the API or just the internals?
- Did you ever find that the compiler was wrong and you had to use unsafe?