Improve handing of missing_docs
for macros
This commit is contained in:
parent
88fd46e129
commit
b49936c0bf
1 changed files with 3 additions and 2 deletions
|
@ -571,8 +571,9 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
|
||||||
self.check_missing_docs_attrs(cx, hir::CRATE_HIR_ID, krate.item.inner, "the", "crate");
|
self.check_missing_docs_attrs(cx, hir::CRATE_HIR_ID, krate.item.inner, "the", "crate");
|
||||||
|
|
||||||
for macro_def in krate.exported_macros {
|
for macro_def in krate.exported_macros {
|
||||||
// Non exported MBE 2.0 macros should be skipped
|
// Non exported macros should be skipped, since `missing_docs` only
|
||||||
if !macro_def.ast.macro_rules && !cx.access_levels.is_exported(macro_def.hir_id()) {
|
// applies to externally visible items.
|
||||||
|
if !cx.access_levels.is_exported(macro_def.hir_id()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue