File tree Expand file tree Collapse file tree 6 files changed +5
-17
lines changed Expand file tree Collapse file tree 6 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 55//! parent directory, and otherwise documentation can be found throughout the `build`
66//! directory in each respective module.
77
8- // NO-RUSTC-WRAPPER
9- #![ deny( warnings, rust_2018_idioms, unused_lifetimes) ]
10-
118use std:: env;
129
1310use bootstrap:: { Config , Build } ;
Original file line number Diff line number Diff line change 1515//! switching compilers for the bootstrap and for build scripts will probably
1616//! never get replaced.
1717
18- // NO-RUSTC-WRAPPER
19- #![ deny( warnings, rust_2018_idioms, unused_lifetimes) ]
20-
2118use std:: env;
2219use std:: ffi:: OsString ;
2320use std:: io;
@@ -124,8 +121,9 @@ fn main() {
124121
125122 if env:: var_os ( "RUSTC_DENY_WARNINGS" ) . is_some ( ) &&
126123 env:: var_os ( "RUSTC_EXTERNAL_TOOL" ) . is_none ( ) {
127- // When extending this list, search for `NO-RUSTC-WRAPPER` and add the new lints
128- // there as well, some code doesn't go through this `rustc` wrapper.
124+ // When extending this list, add the new lints to the RUSTFLAGS of the
125+ // build_bootstrap function of src/bootstrap/bootstrap.py as well as
126+ // some code doesn't go through this `rustc` wrapper.
129127 cmd. arg ( "-Dwarnings" ) ;
130128 cmd. arg ( "-Drust_2018_idioms" ) ;
131129 cmd. arg ( "-Dunused_lifetimes" ) ;
Original file line number Diff line number Diff line change 22//!
33//! See comments in `src/bootstrap/rustc.rs` for more information.
44
5- // NO-RUSTC-WRAPPER
6- #![ deny( warnings, rust_2018_idioms, unused_lifetimes) ]
7-
85use std:: env;
96use std:: process:: Command ;
107use std:: path:: PathBuf ;
Original file line number Diff line number Diff line change @@ -631,6 +631,8 @@ 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+ if self .get_toml ("deny-warnings" , "rust" ) != "false" :
635+ env ["RUSTFLAGS" ] += "-Dwarnings -Drust_2018_idioms -Dunused_lifetimes "
634636
635637 env ["PATH" ] = os .path .join (self .bin_root (), "bin" ) + \
636638 os .pathsep + env ["PATH" ]
Original file line number Diff line number Diff line change 103103//! More documentation can be found in each respective module below, and you can
104104//! also check out the `src/bootstrap/README.md` file for more information.
105105
106- // NO-RUSTC-WRAPPER
107- #![ deny( warnings, rust_2018_idioms, unused_lifetimes) ]
108-
109106#![ feature( core_intrinsics) ]
110107#![ feature( drain_filter) ]
111108
Original file line number Diff line number Diff line change 1- // NO-RUSTC-WRAPPER
2- #![ deny( warnings, rust_2018_idioms, unused_lifetimes) ]
3-
41use std:: fs:: File ;
52use std:: path:: { Path , PathBuf } ;
63use std:: process:: { Command , Stdio } ;
You can’t perform that action at this time.
0 commit comments