1
Fork 0

Remove hir::MacroDef::attrs.

This commit is contained in:
Camille GILLOT 2021-02-18 19:34:40 +01:00
parent fd8a021757
commit c05c90275c
5 changed files with 6 additions and 7 deletions

View file

@ -568,7 +568,8 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
self.check_missing_docs_attrs(cx, hir::CRATE_HIR_ID, krate.item.span, "the", "crate");
for macro_def in krate.exported_macros {
let has_doc = macro_def.attrs.iter().any(|a| has_doc(cx.sess(), a));
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 {
cx.struct_span_lint(
MISSING_DOCS,