Auto merge of #113697 - GuillaumeGomez:rm-unneeded-externallocation-handling, r=lqd

Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context

Should fix perf regression introduced in https://github.com/rust-lang/rust/pull/113623.

r? `@lqd`
This commit is contained in:
bors 2023-07-15 20:31:40 +00:00
commit 4c8bb79d9f
1 changed files with 1 additions and 6 deletions

View File

@ -349,12 +349,7 @@ impl<'tcx> Context<'tcx> {
let e = ExternalCrate { crate_num: cnum };
(e.name(self.tcx()), e.src_root(self.tcx()))
}
ExternalLocation::Unknown => {
let e = ExternalCrate { crate_num: cnum };
let name = e.name(self.tcx());
root = name.to_string();
(name, e.src_root(self.tcx()))
}
ExternalLocation::Unknown => return None,
};
let href = RefCell::new(PathBuf::new());