Skip to content

Commit

Permalink
Prevent running some code if it is already in the map
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 2, 2024
1 parent 11f32b7 commit 256bbf9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/librustdoc/clean/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ pub(crate) fn load_attrs<'hir>(cx: &DocContext<'hir>, did: DefId) -> &'hir [ast:
/// These names are used later on by HTML rendering to generate things like
/// source links back to the original item.
pub(crate) fn record_extern_fqn(cx: &mut DocContext<'_>, did: DefId, kind: ItemType) {
if did.is_local() {
if cx.cache.exact_paths.contains_key(&did) {
return;
}
} else if cx.cache.external_paths.contains_key(&did) {
return;
}

let crate_name = cx.tcx.crate_name(did.krate);

let relative =
Expand Down

0 comments on commit 256bbf9

Please sign in to comment.