Skip to content

Commit f2d4955

Browse files
authored
Rollup merge of #149623 - jieyouxu:redundant-tool-test-step, r=Zalathar
Don't require a normal tool build of clippy/rustfmt when running their test steps This is redundant and wasteful. Noticed in #147372 (comment).
2 parents 2878757 + 4d21e76 commit f2d4955

File tree

1 file changed

+3
-6
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-6
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,7 @@ impl Step for Rustfmt {
524524

525525
/// Runs `cargo test` for rustfmt.
526526
fn run(self, builder: &Builder<'_>) {
527-
let tool_result = builder.ensure(tool::Rustfmt::from_compilers(self.compilers));
528-
let build_compiler = tool_result.build_compiler;
527+
let build_compiler = self.compilers.build_compiler();
529528
let target = self.compilers.target();
530529

531530
let mut cargo = tool::prepare_tool_cargo(
@@ -869,11 +868,9 @@ impl Step for Clippy {
869868
// We need to carefully distinguish the compiler that builds clippy, and the compiler
870869
// that is linked into the clippy being tested. `target_compiler` is the latter,
871870
// and it must also be used by clippy's test runner to build tests and their dependencies.
872-
let compilers = self.compilers;
873-
let target_compiler = compilers.target_compiler();
871+
let target_compiler = self.compilers.target_compiler();
872+
let build_compiler = self.compilers.build_compiler();
874873

875-
let tool_result = builder.ensure(tool::Clippy::from_compilers(compilers));
876-
let build_compiler = tool_result.build_compiler;
877874
let mut cargo = tool::prepare_tool_cargo(
878875
builder,
879876
build_compiler,

0 commit comments

Comments
 (0)