External Publication
Visit Post

Custom Cargo Command to Show Only Errors (Avoid Setting RustFLAGS Every Time)

Rust Internals [Unofficial] February 24, 2026
Source

Using "context" commands can help with this.

alias rust-no-warnings="env RUSTFLAGS=-Awarnings"

Then you can do rust-no-warnings cargo for a one-off build or rust-no-warnings bash for a "session" of it being active.

Ideally it would amend RUSTFLAGS, in which case a simple shell script in ~/.local/bin would be better.

Discussion in the ATmosphere

Loading comments...