We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-Dwarnings
builder.rs
1 parent 1bec962 commit 3a648b6Copy full SHA for 3a648b6
src/bootstrap/bin/rustc.rs
@@ -111,9 +111,6 @@ fn main() {
111
cmd.arg("-Zunstable-options");
112
cmd.arg("-Wrustc::internal");
113
}
114
- if env::var_os("RUSTC_DENY_WARNINGS").is_some() {
115
- cmd.arg("-Dwarnings");
116
- }
117
118
119
if let Some(target) = target {
src/bootstrap/builder.rs
@@ -1055,8 +1055,8 @@ impl<'a> Builder<'a> {
1055
1056
cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());
1057
1058
- if self.config.deny_warnings {
1059
- cargo.env("RUSTC_DENY_WARNINGS", "1");
+ if self.config.deny_warnings && !mode.is_tool() {
+ rustflags.arg("-Dwarnings");
1060
1061
1062
// Throughout the build Cargo can execute a number of build scripts
0 commit comments