diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index eec8c4ad69f23..6a1e4556de85d 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -700,7 +700,7 @@ impl Step for CompiletestTest { /// Runs `cargo test` for compiletest. fn run(self, builder: &Builder<'_>) { let host = self.host; - let compiler = builder.compiler(1, host); + let compiler = builder.compiler(builder.top_stage, host); // We need `ToolStd` for the locally-built sysroot because // compiletest uses unstable features of the `test` crate.