Skip to content

Commit 2bcbb25

Browse files
Remove missing_docs lint on private 2.0 macros
1 parent c5e344f commit 2bcbb25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_lint/src/builtin.rs

+5
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,11 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
571571
self.check_missing_docs_attrs(cx, hir::CRATE_HIR_ID, krate.item.inner, "the", "crate");
572572

573573
for macro_def in krate.exported_macros {
574+
// Non exported MBE 2.0 macros should be skipped
575+
if !macro_def.ast.macro_rules && !cx.access_levels.is_exported(macro_def.hir_id()) {
576+
continue;
577+
}
578+
574579
let attrs = cx.tcx.hir().attrs(macro_def.hir_id());
575580
let has_doc = attrs.iter().any(|a| has_doc(cx.sess(), a));
576581
if !has_doc {

0 commit comments

Comments
 (0)