Skip to content

Commit bef0f25

Browse files
don't process intra-links on extern-crate items
1 parent 001445b commit bef0f25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ impl<'a, 'tcx, 'rcx, 'cstore> DocFolder for LinkCollector<'a, 'tcx, 'rcx, 'cstor
239239
ImplItem(Impl { ref for_, .. }) => {
240240
for_.def_id().map(|did| self.cx.tcx.item_name(did).to_string())
241241
}
242-
ExternCrateItem(ref name, ..) => Some(name.clone()),
242+
// we don't display docs on `extern crate` items anyway, so don't process them
243+
ExternCrateItem(..) => return self.fold_item_recur(item),
243244
ImportItem(Import::Simple(ref name, ..)) => Some(name.clone()),
244245
MacroItem(..) => None,
245246
_ => item.name.clone(),

0 commit comments

Comments
 (0)