Prevent emitting missing_docs for pub extern crate

This commit is contained in:
Guillaume Gomez 2023-06-06 11:50:04 +02:00
parent 51f714c8c5
commit 4711c3078a

View File

@ -548,8 +548,12 @@ fn check_crate(&mut self, cx: &LateContext<'_>) {
fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) {
// Previously the Impl and Use types have been excluded from missing docs,
// so we will continue to exclude them for compatibility
if let hir::ItemKind::Impl(..) | hir::ItemKind::Use(..) = it.kind {
// so we will continue to exclude them for compatibility.
//
// The documentation on `ExternCrate` is not used at the moment so no need to warn for it.
if let hir::ItemKind::Impl(..) | hir::ItemKind::Use(..) | hir::ItemKind::ExternCrate(_) =
it.kind
{
return;
}