-
Notifications
You must be signed in to change notification settings - Fork 2.9k
RUSTFLAGS is easy to misspell as RUST_FLAGS #6406
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: EasyExperience: Easy
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: EasyExperience: Easy
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
I can never remember if it's
RUSTFLAGSorRUST_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
RUSTDOCFLAGSvs. the incorrectRUSTDOC_FLAGS.)Steps
RUST_FLAGSinstead ofRUSTFLAGSRUST_FLAGS=some-arg cargo buildsome-argdidn't take effect (for that specific example, the build "should" fail but doesn't).Possible Solution(s)
Cargo could check for a
RUST_FLAGSenvironment variable and emit a warning (or note) thatRUSTFLAGSwas meant.Notes
Output of
cargo version: cargo 1.31.0 (339d9f9 2018-11-16)