@@ -122,7 +122,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
122122 item. ident . name . as_str ( ) == name
123123 && if let AssocItemKind :: Method { has_self } = item. kind {
124124 has_self && {
125- let did = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. id . hir_id ) ;
125+ let did = cx. tcx . hir ( ) . local_def_id ( item. id . hir_id ) ;
126126 cx. tcx . fn_sig ( did) . inputs ( ) . skip_binder ( ) . len ( ) == 1
127127 }
128128 } else {
@@ -141,7 +141,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
141141
142142 if cx. access_levels . is_exported ( visited_trait. hir_id ) && trait_items. iter ( ) . any ( |i| is_named_self ( cx, i, "len" ) ) {
143143 let mut current_and_super_traits = FxHashSet :: default ( ) ;
144- let visited_trait_def_id = cx. tcx . hir ( ) . local_def_id_from_hir_id ( visited_trait. hir_id ) ;
144+ let visited_trait_def_id = cx. tcx . hir ( ) . local_def_id ( visited_trait. hir_id ) ;
145145 fill_trait_set ( visited_trait_def_id, & mut current_and_super_traits, cx) ;
146146
147147 let is_empty_method_found = current_and_super_traits
@@ -173,7 +173,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
173173 item. ident . name . as_str ( ) == name
174174 && if let AssocItemKind :: Method { has_self } = item. kind {
175175 has_self && {
176- let did = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. id . hir_id ) ;
176+ let did = cx. tcx . hir ( ) . local_def_id ( item. id . hir_id ) ;
177177 cx. tcx . fn_sig ( did) . inputs ( ) . skip_binder ( ) . len ( ) == 1
178178 }
179179 } else {
@@ -193,7 +193,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
193193
194194 if let Some ( i) = impl_items. iter ( ) . find ( |i| is_named_self ( cx, i, "len" ) ) {
195195 if cx. access_levels . is_exported ( i. id . hir_id ) {
196- let def_id = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. hir_id ) ;
196+ let def_id = cx. tcx . hir ( ) . local_def_id ( item. hir_id ) ;
197197 let ty = cx. tcx . type_of ( def_id) ;
198198
199199 span_lint (
0 commit comments