File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -119,17 +119,18 @@ fn main() {
119
119
cmd. arg ( format ! ( "-Cdebuginfo={}" , debuginfo_level) ) ;
120
120
}
121
121
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 ( ) {
124
123
// When extending this list, add the new lints to the RUSTFLAGS of the
125
124
// build_bootstrap function of src/bootstrap/bootstrap.py as well as
126
125
// 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" ) ;
130
128
if use_internal_lints ( crate_name) {
131
129
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" ) ;
133
134
}
134
135
}
135
136
Original file line number Diff line number Diff line change @@ -631,8 +631,9 @@ def build_bootstrap(self):
631
631
target_linker = self .get_toml ("linker" , build_section )
632
632
if target_linker is not None :
633
633
env ["RUSTFLAGS" ] += "-C linker=" + target_linker + " "
634
+ env ["RUSTFLAGS" ] += " -Wrust_2018_idioms -Wunused_lifetimes "
634
635
if self .get_toml ("deny-warnings" , "rust" ) != "false" :
635
- env ["RUSTFLAGS" ] += "-Dwarnings -Drust_2018_idioms -Dunused_lifetimes "
636
+ env ["RUSTFLAGS" ] += "-Dwarnings "
636
637
637
638
env ["PATH" ] = os .path .join (self .bin_root (), "bin" ) + \
638
639
os .pathsep + env ["PATH" ]
You can’t perform that action at this time.
0 commit comments