@@ -148,9 +148,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
148
148
}
149
149
}
150
150
151
- let trait_node_id = cx. tcx . hir ( ) . hir_to_node_id ( visited_trait. hir_id ) ;
152
-
153
- if cx. access_levels . is_exported ( trait_node_id) && trait_items. iter ( ) . any ( |i| is_named_self ( cx, i, "len" ) ) {
151
+ if cx. access_levels . is_exported ( visited_trait. hir_id ) && trait_items. iter ( ) . any ( |i| is_named_self ( cx, i, "len" ) ) {
154
152
let mut current_and_super_traits = FxHashSet :: default ( ) ;
155
153
let visited_trait_def_id = cx. tcx . hir ( ) . local_def_id_from_hir_id ( visited_trait. hir_id ) ;
156
154
fill_trait_set ( visited_trait_def_id, & mut current_and_super_traits, cx) ;
@@ -195,7 +193,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
195
193
let is_empty = if let Some ( is_empty) = impl_items. iter ( ) . find ( |i| is_named_self ( cx, i, "is_empty" ) ) {
196
194
if cx
197
195
. access_levels
198
- . is_exported ( cx . tcx . hir ( ) . hir_to_node_id ( is_empty. id . hir_id ) )
196
+ . is_exported ( is_empty. id . hir_id )
199
197
{
200
198
return ;
201
199
} else {
@@ -206,7 +204,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
206
204
} ;
207
205
208
206
if let Some ( i) = impl_items. iter ( ) . find ( |i| is_named_self ( cx, i, "len" ) ) {
209
- if cx. access_levels . is_exported ( cx . tcx . hir ( ) . hir_to_node_id ( i. id . hir_id ) ) {
207
+ if cx. access_levels . is_exported ( i. id . hir_id ) {
210
208
let def_id = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. hir_id ) ;
211
209
let ty = cx. tcx . type_of ( def_id) ;
212
210
0 commit comments