It's not just the type system either. It also helps that rust has a great ecosystem of tools that catch all kinds of errors at build time. The compiler and clippy together genuinely do prevent a lot of mistakes.
This is a big part of why people often say "if it compiles, it works" in rust.
This is a big part of why people often say "if it compiles, it works" in rust.