We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59f50ab commit 18a8973Copy full SHA for 18a8973
src/cargo/ops/cargo_compile.rs
@@ -398,7 +398,10 @@ pub fn compile_ws<'a>(
398
.iter()
399
.any(|unit| unit.mode.is_rustc_test() && unit.target.harness())
400
{
401
- crates.push("test".to_string());
+ // Only build libtest when libstd is built (libtest depends on libstd)
402
+ if crates.iter().any(|c| c == "std") {
403
+ crates.push("test".to_string());
404
+ }
405
}
406
standard_lib::generate_std_roots(&bcx, &crates, std_resolve.as_ref().unwrap())?
407
} else {
0 commit comments