about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-04-11 01:52:24 +0200
committerGitHub <noreply@github.com>2020-04-11 01:52:24 +0200
commit4dfa73a0d8eec6732b70ced27062913bf5160a48 (patch)
tree76b63f7fd5196a7140aeadd4c6eea64a0cae6130
parent426fb276ad7202f03bd19283573f2694771053ee (diff)
parentb88cb3dc114a04800c5361a8a6a826cd0c554b5b (diff)
downloadrust-4dfa73a0d8eec6732b70ced27062913bf5160a48.tar.gz
rust-4dfa73a0d8eec6732b70ced27062913bf5160a48.zip
Rollup merge of #70881 - eddyb:stage0-hide-incremental-unused-attrs, r=Mark-Simulacrum
bootstrap: work around "unused attribute" errors in incremental stdlib rebuilds.

This should alleviate #58633 separately from a proper fix.

r? @Mark-Simulacrum
-rw-r--r--src/bootstrap/builder.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index b14352d7f4b..7fc089d18f1 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1099,6 +1099,13 @@ impl<'a> Builder<'a> {
 
             if self.config.deny_warnings {
                 rustflags.arg("-Dwarnings");
+
+                // FIXME(#58633) hide "unused attribute" errors in incremental
+                // builds of the standard library, as the underlying checks are
+                // not yet properly integrated with incremental recompilation.
+                if mode == Mode::Std && compiler.stage == 0 && self.config.incremental {
+                    rustflags.arg("-Aunused-attributes");
+                }
             }
         }