Skip to content

Commit b49936c

Browse files
Improve handing of missing_docs for macros
1 parent 88fd46e commit b49936c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_lint/src/builtin.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,9 @@ 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()) {
574+
// Non exported macros should be skipped, since `missing_docs` only
575+
// applies to externally visible items.
576+
if !cx.access_levels.is_exported(macro_def.hir_id()) {
576577
continue;
577578
}
578579

0 commit comments

Comments
 (0)