Rust allows &mut aliasing on static mut variables #47756
Labels
A-borrow-checker
Area: The borrow checker
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Simple example:
I would expect Rust to disallow this type of code, or at least warn about it, but it simply allows the programmer to shoot himself in the foot.
The text was updated successfully, but these errors were encountered: