@@ -182,7 +182,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
182
182
}
183
183
184
184
fn check_crate ( & mut self , cx : & LateContext < ' tcx > ) {
185
- let attrs = cx. tcx . hir ( ) . attrs ( hir:: CRATE_HIR_ID ) ;
185
+ let attrs = cx. tcx . hir_attrs ( hir:: CRATE_HIR_ID ) ;
186
186
self . check_missing_docs_attrs ( cx, CRATE_DEF_ID , attrs, cx. tcx . def_span ( CRATE_DEF_ID ) , "the" , "crate" ) ;
187
187
}
188
188
@@ -224,7 +224,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
224
224
225
225
let ( article, desc) = cx. tcx . article_and_description ( it. owner_id . to_def_id ( ) ) ;
226
226
227
- let attrs = cx. tcx . hir ( ) . attrs ( it. hir_id ( ) ) ;
227
+ let attrs = cx. tcx . hir_attrs ( it. hir_id ( ) ) ;
228
228
if !is_from_proc_macro ( cx, it) {
229
229
self . check_missing_docs_attrs ( cx, it. owner_id . def_id , attrs, it. span , article, desc) ;
230
230
}
@@ -234,7 +234,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
234
234
fn check_trait_item ( & mut self , cx : & LateContext < ' tcx > , trait_item : & ' tcx hir:: TraitItem < ' _ > ) {
235
235
let ( article, desc) = cx. tcx . article_and_description ( trait_item. owner_id . to_def_id ( ) ) ;
236
236
237
- let attrs = cx. tcx . hir ( ) . attrs ( trait_item. hir_id ( ) ) ;
237
+ let attrs = cx. tcx . hir_attrs ( trait_item. hir_id ( ) ) ;
238
238
if !is_from_proc_macro ( cx, trait_item) {
239
239
self . check_missing_docs_attrs ( cx, trait_item. owner_id . def_id , attrs, trait_item. span , article, desc) ;
240
240
}
@@ -252,7 +252,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
252
252
}
253
253
254
254
let ( article, desc) = cx. tcx . article_and_description ( impl_item. owner_id . to_def_id ( ) ) ;
255
- let attrs = cx. tcx . hir ( ) . attrs ( impl_item. hir_id ( ) ) ;
255
+ let attrs = cx. tcx . hir_attrs ( impl_item. hir_id ( ) ) ;
256
256
if !is_from_proc_macro ( cx, impl_item) {
257
257
self . check_missing_docs_attrs ( cx, impl_item. owner_id . def_id , attrs, impl_item. span , article, desc) ;
258
258
}
@@ -261,7 +261,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
261
261
262
262
fn check_field_def ( & mut self , cx : & LateContext < ' tcx > , sf : & ' tcx hir:: FieldDef < ' _ > ) {
263
263
if !sf. is_positional ( ) {
264
- let attrs = cx. tcx . hir ( ) . attrs ( sf. hir_id ) ;
264
+ let attrs = cx. tcx . hir_attrs ( sf. hir_id ) ;
265
265
if !is_from_proc_macro ( cx, sf) {
266
266
self . check_missing_docs_attrs ( cx, sf. def_id , attrs, sf. span , "a" , "struct field" ) ;
267
267
}
@@ -270,7 +270,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
270
270
}
271
271
272
272
fn check_variant ( & mut self , cx : & LateContext < ' tcx > , v : & ' tcx hir:: Variant < ' _ > ) {
273
- let attrs = cx. tcx . hir ( ) . attrs ( v. hir_id ) ;
273
+ let attrs = cx. tcx . hir_attrs ( v. hir_id ) ;
274
274
if !is_from_proc_macro ( cx, v) {
275
275
self . check_missing_docs_attrs ( cx, v. def_id , attrs, v. span , "a" , "variant" ) ;
276
276
}
0 commit comments