Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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 <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jul 29, 2024
commit d3aed2cdb4d4069ef7b6c5c74a3679817272a6ba
1 change: 0 additions & 1 deletion src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ impl Step for JsonDocs {
builder.ensure(crate::core::build_steps::doc::Std::new(
builder.top_stage,
host,
builder,
DocumentationFormat::Json,
));

Expand Down
14 changes: 2 additions & 12 deletions src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,18 +564,8 @@ pub struct Std {
}

impl Std {
pub(crate) fn new(
stage: u32,
target: TargetSelection,
builder: &Builder<'_>,
format: DocumentationFormat,
) -> Self {
let crates = builder
.in_tree_crates("sysroot", Some(target))
.into_iter()
.map(|krate| krate.name.to_string())
.collect();
Std { stage, target, format, crates }
pub(crate) fn new(stage: u32, target: TargetSelection, format: DocumentationFormat) -> Self {
Std { stage, target, format, crates: vec![] }
}
}

Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ impl Step for RustdocJSStd {
builder.ensure(crate::core::build_steps::doc::Std::new(
builder.top_stage,
self.target,
builder,
DocumentationFormat::Html,
));
let _guard = builder.msg(
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/src/core/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,9 @@ macro_rules! std {

macro_rules! doc_std {
($host:ident => $target:ident, stage = $stage:literal) => {{
let config = configure("doc", &["A-A"], &["A-A"]);
let build = Build::new(config);
let builder = Builder::new(&build);
doc::Std::new(
$stage,
TargetSelection::from_user(concat!(stringify!($target), "-", stringify!($target))),
&builder,
DocumentationFormat::Html,
)
}};
Expand Down