@@ -22,7 +22,7 @@ use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT};
2222
2323pub ( super ) fn check_item < ' tcx > ( cx : & LateContext < ' tcx > , item : & ' tcx hir:: Item < ' _ > ) {
2424 let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
25- let attr = cx. tcx . get_attr ( item. owner_id . to_def_id ( ) , sym:: must_use) ;
25+ let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
2626 if let hir:: ItemKind :: Fn ( ref sig, _generics, ref body_id) = item. kind {
2727 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
2828 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
@@ -47,7 +47,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp
4747 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
4848 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
4949 let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
50- let attr = cx. tcx . get_attr ( item. owner_id . to_def_id ( ) , sym:: must_use) ;
50+ let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
5151 if let Some ( attr) = attr {
5252 check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
5353 } else if is_public
@@ -73,7 +73,7 @@ pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Tr
7373 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
7474
7575 let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
76- let attr = cx. tcx . get_attr ( item. owner_id . to_def_id ( ) , sym:: must_use) ;
76+ let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
7777 if let Some ( attr) = attr {
7878 check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
7979 } else if let hir:: TraitFn :: Provided ( eid) = * eid {
0 commit comments