about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-07 01:18:29 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-07 01:18:29 +0300
commit36a5aa832503a2fb6ab2eb80e1873711807430a5 (patch)
tree537aefe783fa501b4e75c5380309934690a60704 /src
parentb11757e0d55a53934b27ecbefa1a89b7b092f7d3 (diff)
downloadrust-36a5aa832503a2fb6ab2eb80e1873711807430a5.tar.gz
rust-36a5aa832503a2fb6ab2eb80e1873711807430a5.zip
Address review comments
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/bin/rustc.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index 2d403038c21..a9225f2870f 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -128,8 +128,10 @@ fn main() {
        env::var_os("RUSTC_EXTERNAL_TOOL").is_none() {
         cmd.arg("-Dwarnings");
         cmd.arg("-Drust_2018_idioms");
-        if stage != "0" && crate_name != Some("rustc_version") && // cfg(not(bootstrap))
-           use_internal_lints(crate_name) {
+        // cfg(not(bootstrap)): Remove this during the next stage 0 compiler update.
+        // `-Drustc::internal` is a new feature and `rustc_version` mis-reports the `stage`.
+        let cfg_not_bootstrap = stage != "0" && crate_name != Some("rustc_version");
+        if cfg_not_bootstrap && use_internal_lints(crate_name) {
             cmd.arg("-Zunstable-options");
             cmd.arg("-Drustc::internal");
         }