Skip to content

Commit 36a5aa8

Browse files
committed
Address review comments
1 parent b11757e commit 36a5aa8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bootstrap/bin/rustc.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ fn main() {
128128
env::var_os("RUSTC_EXTERNAL_TOOL").is_none() {
129129
cmd.arg("-Dwarnings");
130130
cmd.arg("-Drust_2018_idioms");
131-
if stage != "0" && crate_name != Some("rustc_version") && // cfg(not(bootstrap))
132-
use_internal_lints(crate_name) {
131+
// cfg(not(bootstrap)): Remove this during the next stage 0 compiler update.
132+
// `-Drustc::internal` is a new feature and `rustc_version` mis-reports the `stage`.
133+
let cfg_not_bootstrap = stage != "0" && crate_name != Some("rustc_version");
134+
if cfg_not_bootstrap && use_internal_lints(crate_name) {
133135
cmd.arg("-Zunstable-options");
134136
cmd.arg("-Drustc::internal");
135137
}

0 commit comments

Comments
 (0)