|
|
|
|
|
by nyanpasu64
2083 days ago
|
|
Rust's borrow checker would prevent Example 5 from compiling, since once you add `cust` to the collection, you can't touch it anymore (unless you insert a clone or etc.). So in this case at least, the inability to reason about code can be resolved by banning mutable aliasing, without eliminating mutability. |
|
The borrow checker is about validating that references don't outlive their target, and R^W.