There was a recentish thread with a lot of working through mental models for how reborrows work:
-
Starting here
- Skip halfway down the comment to "Finally, I'd like to outline..."
- The main reason to read this portion is it introduces a "chain of exclusive access" concept referred back to later
-
Then here through the end of the thread
- In this part we examine why "no two
&mut
at the same time" is too simplistic of a model - And the following comments work through a few examples
- In this part we examine why "no two
It also contains links to some technical resources on the implementation and why they're sound (but I personally find those harder to consume).