Skip to content

Commit adedaa3

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 0d116b7 commit adedaa3

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
@@ -108,7 +108,6 @@ impl Step for JsonDocs {
108108
builder.ensure(crate::core::build_steps::doc::Std::new(
109109
builder.top_stage,
110110
host,
111-
builder,
112111
DocumentationFormat::Json,
113112
));
114113

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

+2-12
Original file line numberDiff line numberDiff line change
@@ -562,18 +562,8 @@ pub struct Std {
562562
}
563563

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

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

-1
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,6 @@ impl Step for RustdocJSStd {
852852
builder.ensure(crate::core::build_steps::doc::Std::new(
853853
builder.top_stage,
854854
self.target,
855-
builder,
856855
DocumentationFormat::Html,
857856
));
858857
let _guard = builder.msg(

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

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

7676
macro_rules! doc_std {
7777
($host:ident => $target:ident, stage = $stage:literal) => {{
78-
let config = configure("doc", &["A-A"], &["A-A"]);
79-
let build = Build::new(config);
80-
let builder = Builder::new(&build);
8178
doc::Std::new(
8279
$stage,
8380
TargetSelection::from_user(concat!(stringify!($target), "-", stringify!($target))),
84-
&builder,
8581
DocumentationFormat::Html,
8682
)
8783
}};

0 commit comments

Comments
 (0)