about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-26 05:45:54 +0000
committerbors <bors@rust-lang.org>2022-05-26 05:45:54 +0000
commit8bf9c20765bd206dd5ec3c5840cee315c17521aa (patch)
tree748bb38d1061939048e4bfaae90b1deb8e3a8eb8
parent99c4758747db31ff12e18fa16086b0d34a520f5c (diff)
parente71c48c5a08421a4b29f3e1a2420e6e8fe8d13e6 (diff)
downloadrust-8bf9c20765bd206dd5ec3c5840cee315c17521aa.tar.gz
rust-8bf9c20765bd206dd5ec3c5840cee315c17521aa.zip
Auto merge of #97410 - jyn514:tool-std-features, r=Mark-Simulacrum
Only allow `compiletest` to use `feature(test)`, not any other feature

Using language features occasionally causes issues when using nightly to bootstrap, rather than beta.
See #59264 for additional context.
-rw-r--r--src/bootstrap/builder.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 761bd66b505..0fb66e56a8c 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1232,7 +1232,12 @@ impl<'a> Builder<'a> {
                 // HACK: because anyhow does feature detection in build.rs, we need to allow the backtrace feature too.
                 rustflags.arg("-Zallow-features=binary-dep-depinfo,backtrace");
             }
-            Mode::Std | Mode::Rustc | Mode::ToolStd | Mode::Codegen | Mode::ToolRustc => {}
+            Mode::ToolStd => {
+                // Right now this is just compiletest and a few other tools that build on stable.
+                // Allow them to use `feature(test)`, but nothing else.
+                rustflags.arg("-Zallow-features=binary-dep-depinfo,test,backtrace");
+            }
+            Mode::Std | Mode::Rustc | Mode::Codegen | Mode::ToolRustc => {}
         }
 
         cargo.arg("-j").arg(self.jobs().to_string());