Improve handing of missing_docs for macros

This commit is contained in:
inquisitivecrystal 2021-07-08 22:39:31 -07:00
parent 88fd46e129
commit b49936c0bf

View File

@ -571,8 +571,9 @@ fn check_crate(&mut self, cx: &LateContext<'_>, krate: &hir::Crate<'_>) {
self.check_missing_docs_attrs(cx, hir::CRATE_HIR_ID, krate.item.inner, "the", "crate");
for macro_def in krate.exported_macros {
// Non exported MBE 2.0 macros should be skipped
if !macro_def.ast.macro_rules && !cx.access_levels.is_exported(macro_def.hir_id()) {
// Non exported macros should be skipped, since `missing_docs` only
// applies to externally visible items.
if !cx.access_levels.is_exported(macro_def.hir_id()) {
continue;
}