add sanity check for compiler crate docs

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2023-11-04 15:02:38 +03:00
parent 5e2de479fa
commit fda009c858

View File

@ -739,6 +739,14 @@ fn run(self, builder: &Builder<'_>) {
builder.run(&mut cargo.into());
if !builder.config.dry_run() {
// Sanity check on linked compiler crates
for krate in &*self.crates {
let dir_name = krate.replace("-", "_");
assert!(out.join(&*dir_name).exists());
}
}
if builder.paths.iter().any(|path| path.ends_with("compiler")) {
// For `x.py doc compiler --open`, open `rustc_middle` by default.
let index = out.join("rustc_middle").join("index.html");