Skip to content

Commit 8e3ec2c

Browse files
authored
Unrolled build for rust-lang#137119
Rollup merge of rust-lang#137119 - onur-ozkan:fix-broken-core, r=jieyouxu fix broken `x {doc, build} core` Fixes rust-lang#137115
2 parents 5bc6231 + 56f8f48 commit 8e3ec2c

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl Step for Std {
9595
const DEFAULT: bool = true;
9696

9797
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
98-
run.crate_or_deps("sysroot").path("library").alias("core")
98+
run.crate_or_deps("sysroot").path("library")
9999
}
100100

101101
fn make_run(run: RunConfig<'_>) {

src/bootstrap/src/core/build_steps/doc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,7 @@ impl Step for Std {
572572

573573
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
574574
let builder = run.builder;
575-
run.crate_or_deps("sysroot")
576-
.path("library")
577-
.alias("core")
578-
.default_condition(builder.config.docs)
575+
run.crate_or_deps("sysroot").path("library").default_condition(builder.config.docs)
579576
}
580577

581578
fn make_run(run: RunConfig<'_>) {

src/bootstrap/src/core/builder/mod.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,14 @@ impl RunConfig<'_> {
127127
pub fn cargo_crates_in_set(&self) -> Vec<String> {
128128
let mut crates = Vec::new();
129129
for krate in &self.paths {
130-
let path = krate.assert_single_path();
131-
let Some(crate_name) = self.builder.crate_paths.get(&path.path) else {
132-
panic!("missing crate for path {}", path.path.display())
133-
};
130+
let path = &krate.assert_single_path().path;
131+
132+
let crate_name = self
133+
.builder
134+
.crate_paths
135+
.get(path)
136+
.unwrap_or_else(|| panic!("missing crate for path {}", path.display()));
137+
134138
crates.push(crate_name.to_string());
135139
}
136140
crates

0 commit comments

Comments
 (0)