diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 60808dcba6144..e087e2b8ff153 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -484,10 +484,13 @@ impl Step for CompiletestTest { let host = self.host; let compiler = builder.compiler(0, host); + // We need `ToolStd` for the locally-built sysroot because + // compiletest uses unstable features of the `test` crate. + builder.ensure(compile::Std { compiler, target: host }); let cargo = tool::prepare_tool_cargo( builder, compiler, - Mode::ToolBootstrap, + Mode::ToolStd, host, "test", "src/tools/compiletest",