Skip to content

Commit e71c48c

Browse files
committed
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.
1 parent 1b5e121 commit e71c48c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/builder.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,12 @@ impl<'a> Builder<'a> {
12321232
// HACK: because anyhow does feature detection in build.rs, we need to allow the backtrace feature too.
12331233
rustflags.arg("-Zallow-features=binary-dep-depinfo,backtrace");
12341234
}
1235-
Mode::Std | Mode::Rustc | Mode::ToolStd | Mode::Codegen | Mode::ToolRustc => {}
1235+
Mode::ToolStd => {
1236+
// Right now this is just compiletest and a few other tools that build on stable.
1237+
// Allow them to use `feature(test)`, but nothing else.
1238+
rustflags.arg("-Zallow-features=binary-dep-depinfo,test,backtrace");
1239+
}
1240+
Mode::Std | Mode::Rustc | Mode::Codegen | Mode::ToolRustc => {}
12361241
}
12371242

12381243
cargo.arg("-j").arg(self.jobs().to_string());

0 commit comments

Comments
 (0)