Idiomatic Rust Code and LLMs A developer's hands-on comparison found that StepFun's Step 5 Preview and Mistral Large 4 generate working Rust code that is not idiomatic, relying on C-style `idx` local variables and byte accesses, while Claude (Opus through Haiku, including the cheap Claude Haiku 5.5) and GPT models produce idiomatic Rust using standard library functions such as `position` and `is_ascii_whitespace`, plus `Option`, `iter` and `map`. The author says the non-idiomatic output still works but leads him to prefer Claude or GPT, and recommends some AI companies change their training data. I used Step 5 Preview today from StepFun to generate some Rust code . It worked correctly, but like the code I generated with Mistral Large 4, it was not really idiomatic Rust code . Instead it uses a lot of idx local variables and byte accesses like you would see in C code. Meanwhile, Claude From Opus to Haiku and GPT seem to have become proficient at writing idiomatic Rust code. This means using standard library functions like position and is ascii whitespace , Option , iter , map . For example, in Rust it is much cleaner to use is ascii whitespace to test for a whitespace byte, and use position instead of a loop. Even though code from models that do not write idiomatic Rust code as eagerly works, I tend to end up preferring Claude or GPT. Even Claude Haiku 5.5 , which is really cheap, can do this, but large, expensive competing models cannot. I recommend a change in training data for some of the AI companies.