Remove hir::StructField::attrs.

This commit is contained in:
Camille GILLOT 2020-11-27 00:27:34 +01:00
parent 55f68ead6b
commit c3a17dba6c
1 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,8 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
fn check_struct_field(&mut self, cx: &LateContext<'tcx>, sf: &'tcx hir::StructField<'_>) {
if !sf.is_positional() {
self.check_missing_docs_attrs(cx, &sf.attrs, sf.span, "a", "struct field");
let attrs = cx.tcx.hir().attrs(sf.hir_id);
self.check_missing_docs_attrs(cx, attrs, sf.span, "a", "struct field");
}
}