about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJoshua Nelson <github@jyn.dev>2023-02-03 05:29:43 +0000
committerJoshua Nelson <github@jyn.dev>2023-02-03 05:33:46 +0000
commit9be0b3e2bc4f9fce1a47305d0efbc674e312e09e (patch)
treee3af793c70d9f5071e2ad6b627f580dd9ad4e00b /src/bootstrap
parent8789e5392975203137765d7818fb23ad125782b3 (diff)
downloadrust-9be0b3e2bc4f9fce1a47305d0efbc674e312e09e.tar.gz
rust-9be0b3e2bc4f9fce1a47305d0efbc674e312e09e.zip
Fix `x fix` on the standard library itself
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 ({} -> {})",