@@ -21,7 +21,7 @@ use core::ops::ControlFlow;
21
21
use super :: { DOUBLE_MUST_USE , MUST_USE_CANDIDATE , MUST_USE_UNIT } ;
22
22
23
23
pub ( 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 ( ) ) ;
25
25
let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
26
26
if let hir:: ItemKind :: Fn {
27
27
ref sig,
@@ -51,7 +51,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp
51
51
if let hir:: ImplItemKind :: Fn ( ref sig, ref body_id) = item. kind {
52
52
let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
53
53
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 ( ) ) ;
55
55
let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
56
56
if let Some ( attr) = attr {
57
57
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
74
74
let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
75
75
let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
76
76
77
- let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
77
+ let attrs = cx. tcx . hir_attrs ( item. hir_id ( ) ) ;
78
78
let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
79
79
if let Some ( attr) = attr {
80
80
check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr, attrs, sig) ;
0 commit comments