Skip to content

Commit 0211221

Browse files
Prevent running some code if it is already in the map
1 parent 4e3eed4 commit 0211221

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)