Skip to content

Commit d3aed2c

Browse files
committed
remove the requirement of Builder arg in doc::Std::new function
`crates` field is handled in the `Step::make_run` just like in any other `Std` implementation, so we don't need to resolve them in `Std::new`. Signed-off-by: onur-ozkan <[email protected]>
1 parent 4c87e84 commit d3aed2c

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

src/bootstrap/src/core/build_steps/dist.rs

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ impl Step for JsonDocs {
106106
builder.ensure(crate::core::build_steps::doc::Std::new(
107107
builder.top_stage,
108108
host,
109-
builder,
110109
DocumentationFormat::Json,
111110
));
112111

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

+2-12
Original file line numberDiff line numberDiff line change
@@ -564,18 +564,8 @@ pub struct Std {
564564
}
565565

566566
impl Std {
567-
pub(crate) fn new(
568-
stage: u32,
569-
target: TargetSelection,
570-
builder: &Builder<'_>,
571-
format: DocumentationFormat,
572-
) -> Self {
573-
let crates = builder
574-
.in_tree_crates("sysroot", Some(target))
575-
.into_iter()
576-
.map(|krate| krate.name.to_string())
577-
.collect();
578-
Std { stage, target, format, crates }
567+
pub(crate) fn new(stage: u32, target: TargetSelection, format: DocumentationFormat) -> Self {
568+
Std { stage, target, format, crates: vec![] }
579569
}
580570
}
581571

src/bootstrap/src/core/build_steps/test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,6 @@ impl Step for RustdocJSStd {
847847
builder.ensure(crate::core::build_steps::doc::Std::new(
848848
builder.top_stage,
849849
self.target,
850-
builder,
851850
DocumentationFormat::Html,
852851
));
853852
let _guard = builder.msg(

src/bootstrap/src/core/builder/tests.rs

-4
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,9 @@ macro_rules! std {
7979

8080
macro_rules! doc_std {
8181
($host:ident => $target:ident, stage = $stage:literal) => {{
82-
let config = configure("doc", &["A-A"], &["A-A"]);
83-
let build = Build::new(config);
84-
let builder = Builder::new(&build);
8582
doc::Std::new(
8683
$stage,
8784
TargetSelection::from_user(concat!(stringify!($target), "-", stringify!($target))),
88-
&builder,
8985
DocumentationFormat::Html,
9086
)
9187
}};

0 commit comments

Comments
 (0)