diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index a8e1254047363..2d68ccd631b1b 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -3529,11 +3529,13 @@ impl Step for TestFloatParse { fn run(self, builder: &Builder<'_>) { let bootstrap_host = builder.config.build; - let compiler = builder.compiler(0, bootstrap_host); + let compiler = builder.compiler(builder.top_stage, bootstrap_host); let path = self.path.to_str().unwrap(); let crate_name = self.path.components().last().unwrap().as_os_str().to_str().unwrap(); - builder.ensure(compile::Std::new(compiler, self.host)); + if !builder.download_rustc() { + builder.ensure(compile::Std::new(compiler, self.host)); + } // Run any unit tests in the crate let cargo_test = tool::prepare_tool_cargo(