@@ -122,7 +122,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
122
122
item. ident . name . as_str ( ) == name
123
123
&& if let AssocItemKind :: Method { has_self } = item. kind {
124
124
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 ) ;
126
126
cx. tcx . fn_sig ( did) . inputs ( ) . skip_binder ( ) . len ( ) == 1
127
127
}
128
128
} else {
@@ -141,7 +141,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
141
141
142
142
if cx. access_levels . is_exported ( visited_trait. hir_id ) && trait_items. iter ( ) . any ( |i| is_named_self ( cx, i, "len" ) ) {
143
143
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 ) ;
145
145
fill_trait_set ( visited_trait_def_id, & mut current_and_super_traits, cx) ;
146
146
147
147
let is_empty_method_found = current_and_super_traits
@@ -173,7 +173,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
173
173
item. ident . name . as_str ( ) == name
174
174
&& if let AssocItemKind :: Method { has_self } = item. kind {
175
175
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 ) ;
177
177
cx. tcx . fn_sig ( did) . inputs ( ) . skip_binder ( ) . len ( ) == 1
178
178
}
179
179
} else {
@@ -193,7 +193,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
193
193
194
194
if let Some ( i) = impl_items. iter ( ) . find ( |i| is_named_self ( cx, i, "len" ) ) {
195
195
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 ) ;
197
197
let ty = cx. tcx . type_of ( def_id) ;
198
198
199
199
span_lint (
0 commit comments