add sanity check for compiler crate docs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
5e2de479fa
commit
fda009c858
@ -739,6 +739,14 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
|
|
||||||
builder.run(&mut cargo.into());
|
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")) {
|
if builder.paths.iter().any(|path| path.ends_with("compiler")) {
|
||||||
// For `x.py doc compiler --open`, open `rustc_middle` by default.
|
// For `x.py doc compiler --open`, open `rustc_middle` by default.
|
||||||
let index = out.join("rustc_middle").join("index.html");
|
let index = out.join("rustc_middle").join("index.html");
|
||||||
|
Loading…
Reference in New Issue
Block a user