Skip to content

Commit e18b64f

Browse files
committed
refactor(build-std): skip consulting std_crate
The only functionality of `standard_lib::std_crates` is adding `test` to the requested crate list. `resolve_std` already unconditionally adds `sysroot` to the list, which always includes `test` in dependency graph. Therefore calling `std_crates` is redundant.
1 parent c77edbf commit e18b64f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cargo/ops/cargo_fetch.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ pub fn fetch<'a>(
6464
}
6565

6666
// If -Zbuild-std was passed, download dependencies for the standard library.
67-
// We don't know ahead of time what jobs we'll be running, so tell `std_crates` that.
68-
if let Some(crates) = standard_lib::std_crates(gctx, None) {
67+
if let Some(crates) = gctx.cli_unstable().build_std.as_ref() {
6968
let (std_package_set, _, _) =
7069
standard_lib::resolve_std(ws, &mut data, &build_config, &crates)?;
7170
packages.add_set(std_package_set);

0 commit comments

Comments
 (0)