Skip to content

Commit

Permalink
ignore rustdoc failures for out-of-tree tools
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung authored and b-ncMN committed Jul 3, 2022
1 parent 45a69cc commit ed92d88
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,17 @@ macro_rules! tool_doc {
cargo.rustdocflag("--show-type-layout");
cargo.rustdocflag("--generate-link-to-definition");
cargo.rustdocflag("-Zunstable-options");
builder.run(&mut cargo.into());
if $in_tree == true {
builder.run(&mut cargo.into());
} else {
// Allow out-of-tree docs to fail (since the tool might be in a broken state).
if !builder.try_run(&mut cargo.into()) {
builder.info(&format!(
"WARNING: tool {} failed to document; ignoring failure because it is an out-of-tree tool",
stringify!($tool).to_lowercase(),
));
}
}
}
}
}
Expand Down

0 comments on commit ed92d88

Please sign in to comment.