about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 ({} -> {})",