even if the LLM is trained on flawless C code (which it isn't) it still has no way of reasoning about a complex system, it's just "what token is statistically most likely to come next"
I said that because it's very possible for someone to write a more flawed program without an LLMs help. The exact probabilities weren't central to my point.
Rust compiler checks things for you. People trust the Rust compiler because it enforces rules they want, so people don’t have to be in its place.
Your suggestion is to be that checker to LLM-generated code. Back to square one.
On the contrary LLMs make using safe but constraining languages easier - you can just ask it how to do what you want in Rust, perhaps even by asking it to translate C-ish pseudocode.
Rust is really good for building solid services. Indexfiy has never crashed for us in unexpected ways. The other option was to build this in C++ but the state of package management in C++ is really bad so I chose to use Rust.
Rust was a great idea, before LLMs, but I don't see the motivation for Rust when LLMs can be the solution initial for C/C++ 'problems'.