These things are essential if you don't have a GC but have a way to free memory, because the bugs they prevent would result in accessing reading or writing memory at invalid addresses.
That's not a problem with a GC, but they are still very useful because they prevent these issues that cannot be statically prevented in Java/JavaScript:
- Exceptions due to one part of the program manipulating a data structure while another is accessing it: the canonical example is someone iterating a dictionary while something else mutates it
- The program keeping a reference to mutex-protected data after unlocking the mutex
- Two threads manipulating the same object, causing races
- Something accessing a File that is closed, or in general a type in an unexpected state (this is because with a GC you can't "destroy" the previous object, but merely set it to a "closed" state that you can't statically check)
- Exceptions due to null pointers
So in general Rust is a safer language than Java, JavaScript and languages equivalent to them.
It's a little less strong than your impression. Memory absolutely can be a problem, but instead of looking over the entire program to find it, you know the problem comes from a marked unsafe block.
Rust is intended for performant, close-to-the-metal (hence the name) programming, so mandatory GC/RC won't cut it, but a single-threading restriction won't cut it either. And I think the way the borrow system implicitly gives you all the properties needed for thread-safety is one of the best things about Rust's design.
http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.ht...
https://medium.com/@tomaka/the-glium-library-5be149d87dc1
https://blog.mozilla.org/research/2014/08/26/javascript-serv...