RUSTFLAGS is easy to misspell as RUST_FLAGS #6406
Labels
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
E-easy
Experience: Easy
Problem
I can never remember if it's
RUSTFLAGS
orRUST_FLAGS
, and writing the latter silently does nothing. This is made worse because essentially every other environment variable cargo understands or declares uses_
s: https://doc.rust-lang.org/cargo/reference/environment-variables.html(This also applies to
RUSTDOCFLAGS
vs. the incorrectRUSTDOC_FLAGS
.)Steps
RUST_FLAGS
instead ofRUSTFLAGS
RUST_FLAGS=some-arg cargo build
some-arg
didn't take effect (for that specific example, the build "should" fail but doesn't).Possible Solution(s)
Cargo could check for a
RUST_FLAGS
environment variable and emit a warning (or note) thatRUSTFLAGS
was meant.Notes
Output of
cargo version
: cargo 1.31.0 (339d9f9 2018-11-16)The text was updated successfully, but these errors were encountered: