Skip to content

Commit eed49b4

Browse files
authored
Unrolled build for rust-lang#128631
Rollup merge of rust-lang#128631 - onur-ozkan:hotfix, r=Mark-Simulacrum handle crates when they are not specified for std docs Fixes a regression from rust-lang#128182. Resolves rust-lang#128610
2 parents 2b78d92 + 2ac0969 commit eed49b4

File tree

1 file changed

+12
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+12
-2
lines changed

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,16 @@ impl Step for Std {
599599
fn run(self, builder: &Builder<'_>) {
600600
let stage = self.stage;
601601
let target = self.target;
602+
let crates = if self.crates.is_empty() {
603+
builder
604+
.in_tree_crates("sysroot", Some(target))
605+
.iter()
606+
.map(|c| c.name.to_string())
607+
.collect()
608+
} else {
609+
self.crates
610+
};
611+
602612
let out = match self.format {
603613
DocumentationFormat::Html => builder.doc_out(target),
604614
DocumentationFormat::Json => builder.json_doc_out(target),
@@ -627,7 +637,7 @@ impl Step for Std {
627637
extra_args.push("--disable-minification");
628638
}
629639

630-
doc_std(builder, self.format, stage, target, &out, &extra_args, &self.crates);
640+
doc_std(builder, self.format, stage, target, &out, &extra_args, &crates);
631641

632642
// Don't open if the format is json
633643
if let DocumentationFormat::Json = self.format {
@@ -639,7 +649,7 @@ impl Step for Std {
639649
let index = out.join("std").join("index.html");
640650
builder.open_in_browser(index);
641651
} else {
642-
for requested_crate in &*self.crates {
652+
for requested_crate in crates {
643653
if STD_PUBLIC_CRATES.iter().any(|&k| k == requested_crate) {
644654
let index = out.join(requested_crate).join("index.html");
645655
builder.open_in_browser(index);

0 commit comments

Comments
 (0)