Inject compiler flags for one build.
Section: Environment variables
Pass custom compiler flags
bash
bash
RUSTFLAGS="-D warnings" cargo checkExplanation
Handy for stricter CI or low-level compiler experiments.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Environment variables