Remove missing_docs lint on private 2.0 macros

This commit is contained in:
inquisitivecrystal 2021-07-07 17:42:03 -07:00
parent c5e344f774
commit 2bcbb25cb5

View File

@ -571,6 +571,11 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
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()) {
continue;
}
let attrs = cx.tcx.hir().attrs(macro_def.hir_id());
let has_doc = attrs.iter().any(|a| has_doc(cx.sess(), a));
if !has_doc {