7 CLAUDE.md Rules That Make AI Write Idiomatic Rust (Not C++ in Disguise)
Olivia Craft
If you've ever asked Claude Code, Cursor, or Copilot to "add a function" to a Rust crate, you know the output: borrowed &str everywhere with explicit lifetimes leaking into public signatures, .unwrap() on every Result , a std::sync::Mutex held across an .await , and a panic!() instead of an error path. It compiles. It also looks like C++ wearing a Rust hat. The cause is the training data. Most Rust code AI has seen is example snippets — the parts that elide error handling, ignore async correctne
