@@ -21,7 +21,7 @@ use core::ops::ControlFlow;
2121use super :: { DOUBLE_MUST_USE , MUST_USE_CANDIDATE , MUST_USE_UNIT } ;
2222
2323pub ( super ) fn check_item < ' tcx > ( cx : & LateContext < ' tcx > , item : & ' tcx hir:: Item < ' _ > ) {
24- let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
24+ let attrs = cx. tcx . hir_attrs ( item. hir_id ( ) ) ;
2525 let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
2626 if let hir:: ItemKind :: Fn {
2727 ref sig,
@@ -51,7 +51,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp
5151 if let hir:: ImplItemKind :: Fn ( ref sig, ref body_id) = item. kind {
5252 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
5353 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
54- let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
54+ let attrs = cx. tcx . hir_attrs ( item. hir_id ( ) ) ;
5555 let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
5656 if let Some ( attr) = attr {
5757 check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr, attrs, sig) ;
@@ -74,7 +74,7 @@ pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Tr
7474 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
7575 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
7676
77- let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
77+ let attrs = cx. tcx . hir_attrs ( item. hir_id ( ) ) ;
7878 let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
7979 if let Some ( attr) = attr {
8080 check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr, attrs, sig) ;
0 commit comments