From 226b17508f45632d1c962b228718e072d03a4037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 24 Aug 2026 08:04:10 +0200 Subject: [PATCH] Check for missing rustfmt in the stdarch intrinsic test step sooner --- src/bootstrap/src/core/build_steps/test.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index e308801b2548f..31b31ecb89c46 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1102,6 +1102,14 @@ impl CommandLineStep for IntrinsicTest { builder.info(&format!("Skipping intrinsic-test, as it is not available for {host}")); return; } + // intrinsic-test shells out to `cargo` and `rustfmt` make bootstrap's + // managed binaries findable by prepending their dirs to PATH. + let Some(rustfmt_path) = builder.ensure(InternalRustfmt) else { + eprintln!( + "WARNING: intrinsic-test skipped because rustfmt is required but not available on this channel" + ); + return; + }; let (input_file, skip_file, cflags, sde_runner) = if host.contains("x86_64-unknown-linux") { let Some(sde) = &builder.config.sde else { @@ -1172,14 +1180,6 @@ impl CommandLineStep for IntrinsicTest { cmd.arg("--cc-arg-style").arg("gcc"); cmd.env("CC", builder.cc(host)); cmd.env("CFLAGS", cflags); - // intrinsic-test shells out to `cargo` and `rustfmt` make bootstrap's - // managed binaries findable by prepending their dirs to PATH. - let Some(rustfmt_path) = builder.ensure(InternalRustfmt) else { - eprintln!( - "WARNING: intrinsic-test skipped because rustfmt is required but not available on this channel" - ); - return; - }; let mut path_dirs: Vec = Vec::new(); if let Some(cargo_dir) = builder.initial_cargo.parent() {