Auto merge of #91948 - nnethercote:rustdoc-more-Symbols, r=GuillaumeGomez

rustdoc: avoid many `Symbol` to `String` conversions.

Particularly when constructing file paths and fully qualified paths.
This avoids a lot of allocations, speeding things up on almost all
examples.

r? `@GuillaumeGomez`
This commit is contained in:
bors 2022-01-14 20:34:18 +00:00
commit b0ec3e09a9
14 changed files with 256 additions and 169 deletions

View file

@ -562,7 +562,7 @@ pub(super) fn write_shared(
let mut mydst = dst.clone();
for part in &remote_path[..remote_path.len() - 1] {
mydst.push(part);
mydst.push(part.to_string());
}
cx.shared.ensure_dir(&mydst)?;
mydst.push(&format!("{}.{}.js", remote_item_type, remote_path[remote_path.len() - 1]));