about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-02-14 18:24:40 +0100
committerGitHub <noreply@github.com>2023-02-14 18:24:40 +0100
commit2c1d3e92e01fedc6e1ccd816d6278e86dcbc8698 (patch)
tree34c5db215c4b098f2060cc8c96a071e29e421b16 /src/bootstrap
parenta1ba8611907f847d8bc43565566ee739dd9d5202 (diff)
parent9be0b3e2bc4f9fce1a47305d0efbc674e312e09e (diff)
downloadrust-2c1d3e92e01fedc6e1ccd816d6278e86dcbc8698.tar.gz
rust-2c1d3e92e01fedc6e1ccd816d6278e86dcbc8698.zip
Rollup merge of #107626 - jyn514:x-fix, r=Mark-Simulacrum
Fix `x fix` on the standard library itself

Fixes https://github.com/rust-lang/rust/issues/107501
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/check.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 4b8a58e87b6..1675ed158c9 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -99,6 +99,10 @@ impl Step for Std {
             cargo_subcommand(builder.kind),
         );
         std_cargo(builder, target, compiler.stage, &mut cargo);
+        if matches!(builder.config.cmd, Subcommand::Fix { .. }) {
+            // By default, cargo tries to fix all targets. Tell it not to fix tests until we've added `test` to the sysroot.
+            cargo.arg("--lib");
+        }
 
         builder.info(&format!(
             "Checking stage{} library artifacts ({} -> {})",