Skip to content

Commit c3a17db

Browse files
committed
Remove hir::StructField::attrs.
1 parent 55f68ea commit c3a17db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/missing_doc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
187187

188188
fn check_struct_field(&mut self, cx: &LateContext<'tcx>, sf: &'tcx hir::StructField<'_>) {
189189
if !sf.is_positional() {
190-
self.check_missing_docs_attrs(cx, &sf.attrs, sf.span, "a", "struct field");
190+
let attrs = cx.tcx.hir().attrs(sf.hir_id);
191+
self.check_missing_docs_attrs(cx, attrs, sf.span, "a", "struct field");
191192
}
192193
}
193194

0 commit comments

Comments
 (0)