# Why does Rust check borrow even in single thread
(Jin Qing's Column, Aug. 7, 2021)
The Rust book says borrow checking is to prevent data race.
But the borrow checker forbids multiply mutable borrows even in the same thread.
Is there data race in single thread?
Why does the borrow checker forbid it in the same thread?
[The Problem With Single-threaded Shared Mutability](https://manishearth.github.io/blog/2015/05/17/the-problem-with-shared-mutability/)
answers this question.
It gaves 2 cases that shared mutability causes prolem.
One is Rust enum variable, which can has different inner type.
If the inner type changed, the references to the old data would be invalidated.
Another case is Iterator invalidation that the container's change can invalidate the Iterator.