Rust does prevent:
* Data races
Rust does not prevent:
* Deadlocks
* Race conditions
* Memory leaks
* Logic bugs
That said, it does make some of these things harder to accidentally introduce, but strictly speaking does not prevent them, it's true.
* Data races
Rust does not prevent:
* Deadlocks
* Race conditions
* Memory leaks
* Logic bugs
That said, it does make some of these things harder to accidentally introduce, but strictly speaking does not prevent them, it's true.
This is different from Rust's guarantees about memory and thread safety, which you can't break without `unsafe`.
However, it is possible to leak, e.g. if you use a reference-counted type and create a cycle. There's also Box::leak() that does what it says (it's useful for singleton-like things).