diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 761bd66b5057b..0fb66e56a8c38 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());