File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -119,17 +119,18 @@ fn main() {
119119 cmd. arg ( format ! ( "-Cdebuginfo={}" , debuginfo_level) ) ;
120120 }
121121
122- if env:: var_os ( "RUSTC_DENY_WARNINGS" ) . is_some ( ) &&
123- env:: var_os ( "RUSTC_EXTERNAL_TOOL" ) . is_none ( ) {
122+ if env:: var_os ( "RUSTC_EXTERNAL_TOOL" ) . is_none ( ) {
124123 // When extending this list, add the new lints to the RUSTFLAGS of the
125124 // build_bootstrap function of src/bootstrap/bootstrap.py as well as
126125 // some code doesn't go through this `rustc` wrapper.
127- cmd. arg ( "-Dwarnings" ) ;
128- cmd. arg ( "-Drust_2018_idioms" ) ;
129- cmd. arg ( "-Dunused_lifetimes" ) ;
126+ cmd. arg ( "-Wrust_2018_idioms" ) ;
127+ cmd. arg ( "-Wunused_lifetimes" ) ;
130128 if use_internal_lints ( crate_name) {
131129 cmd. arg ( "-Zunstable-options" ) ;
132- cmd. arg ( "-Drustc::internal" ) ;
130+ cmd. arg ( "-Wrustc::internal" ) ;
131+ }
132+ if env:: var_os ( "RUSTC_DENY_WARNINGS" ) . is_some ( ) {
133+ cmd. arg ( "-Dwarnings" ) ;
133134 }
134135 }
135136
Original file line number Diff line number Diff line change @@ -631,8 +631,9 @@ def build_bootstrap(self):
631631 target_linker = self .get_toml ("linker" , build_section )
632632 if target_linker is not None :
633633 env ["RUSTFLAGS" ] += "-C linker=" + target_linker + " "
634+ env ["RUSTFLAGS" ] += " -Wrust_2018_idioms -Wunused_lifetimes "
634635 if self .get_toml ("deny-warnings" , "rust" ) != "false" :
635- env ["RUSTFLAGS" ] += "-Dwarnings -Drust_2018_idioms -Dunused_lifetimes "
636+ env ["RUSTFLAGS" ] += "-Dwarnings "
636637
637638 env ["PATH" ] = os .path .join (self .bin_root (), "bin" ) + \
638639 os .pathsep + env ["PATH" ]
You can’t perform that action at this time.
0 commit comments