Skip to content

Commit ed92d88

Browse files
RalfJungb-NC
authored andcommitted
ignore rustdoc failures for out-of-tree tools
1 parent 45a69cc commit ed92d88

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/bootstrap/doc.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,17 @@ macro_rules! tool_doc {
729729
cargo.rustdocflag("--show-type-layout");
730730
cargo.rustdocflag("--generate-link-to-definition");
731731
cargo.rustdocflag("-Zunstable-options");
732-
builder.run(&mut cargo.into());
732+
if $in_tree == true {
733+
builder.run(&mut cargo.into());
734+
} else {
735+
// Allow out-of-tree docs to fail (since the tool might be in a broken state).
736+
if !builder.try_run(&mut cargo.into()) {
737+
builder.info(&format!(
738+
"WARNING: tool {} failed to document; ignoring failure because it is an out-of-tree tool",
739+
stringify!($tool).to_lowercase(),
740+
));
741+
}
742+
}
733743
}
734744
}
735745
}

0 commit comments

Comments
 (0)