The same goes for Rust and most other "safe" languages. They all have synchronization primitives that make it safe, but you need to use them - the compiler won't always tell you.
There are of course workarounds for this like reference counted wrappers and so on.