Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 256bbf9

Browse files
committedFeb 2, 2024
Prevent running some code if it is already in the map
1 parent 11f32b7 commit 256bbf9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/librustdoc/clean/inline.rs

+8
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ pub(crate) fn load_attrs<'hir>(cx: &DocContext<'hir>, did: DefId) -> &'hir [ast:
196196
/// These names are used later on by HTML rendering to generate things like
197197
/// source links back to the original item.
198198
pub(crate) fn record_extern_fqn(cx: &mut DocContext<'_>, did: DefId, kind: ItemType) {
199+
if did.is_local() {
200+
if cx.cache.exact_paths.contains_key(&did) {
201+
return;
202+
}
203+
} else if cx.cache.external_paths.contains_key(&did) {
204+
return;
205+
}
206+
199207
let crate_name = cx.tcx.crate_name(did.krate);
200208

201209
let relative =

0 commit comments

Comments
 (0)
Please sign in to comment.