rustbuild: Copy crate doc files fewer times

Previously when building documentation for the standard library we'd
copy all the files 5 times, and these files include libcore/libstd docs
which are huge! This commit instead only copies the files after rustdoc
has been run for each crate, reducing the number of redundant copies
we're making.
This commit is contained in:
Alex Crichton 2019-09-19 07:48:04 -07:00
parent 9b9d2aff8d
commit d7f64749c0

@ -476,11 +476,11 @@ impl Step for Std {
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"));
builder.run(&mut cargo);
builder.cp_r(&my_out, &out);
};
for krate in &["alloc", "core", "std", "proc_macro", "test"] {
run_cargo_rustdoc_for(krate);
}
builder.cp_r(&my_out, &out);
}
}