@@ -491,7 +491,7 @@ fn check_item<'tcx>(
491491 worklist. push ( id. def_id ) ;
492492 }
493493
494- match tcx. hir ( ) . def_kind ( id. def_id ) {
494+ match tcx. def_kind ( id. def_id ) {
495495 DefKind :: Enum => {
496496 let item = tcx. hir ( ) . item ( id) ;
497497 if let hir:: ItemKind :: Enum ( ref enum_def, _) = item. kind {
@@ -544,7 +544,7 @@ fn check_item<'tcx>(
544544
545545fn check_trait_item < ' tcx > ( tcx : TyCtxt < ' tcx > , worklist : & mut Vec < LocalDefId > , id : hir:: TraitItemId ) {
546546 use hir:: TraitItemKind :: { Const , Fn } ;
547- if matches ! ( tcx. hir ( ) . def_kind( id. def_id) , DefKind :: AssocConst | DefKind :: AssocFn ) {
547+ if matches ! ( tcx. def_kind( id. def_id) , DefKind :: AssocConst | DefKind :: AssocFn ) {
548548 let trait_item = tcx. hir ( ) . trait_item ( id) ;
549549 if matches ! ( trait_item. kind, Const ( _, Some ( _) ) | Fn ( _, hir:: TraitFn :: Provided ( _) ) )
550550 && has_allow_dead_code_or_lang_attr ( tcx, trait_item. hir_id ( ) )
@@ -559,7 +559,7 @@ fn check_foreign_item<'tcx>(
559559 worklist : & mut Vec < LocalDefId > ,
560560 id : hir:: ForeignItemId ,
561561) {
562- if matches ! ( tcx. hir ( ) . def_kind( id. def_id) , DefKind :: Static ( _) | DefKind :: Fn )
562+ if matches ! ( tcx. def_kind( id. def_id) , DefKind :: Static ( _) | DefKind :: Fn )
563563 && has_allow_dead_code_or_lang_attr ( tcx, id. hir_id ( ) )
564564 {
565565 worklist. push ( id. def_id ) ;
0 commit comments