Statically typed languages were always much better for reasoning on the codebase in general from the start even before LLMs. Now LLMs have just made that much clearer.
But it isn't about it necessarily "compiling", It's about whether the logic of the program matches the programmer's intent. The program can still compile but produce the incorrect result and Rust doesn't prevent bugs from logic errors and using LLMs won't solve that either.
In fact to the untrained eye you would not even notice the logic error introduced by an AI, even with tests. This is the best example. [0]
[0] https://sketch.dev/blog/our-first-outage-from-llm-written-co...