@@ -148,9 +148,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item, trait_items
148148 }
149149 }
150150
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" ) ) {
154152 let mut current_and_super_traits = FxHashSet :: default ( ) ;
155153 let visited_trait_def_id = cx. tcx . hir ( ) . local_def_id_from_hir_id ( visited_trait. hir_id ) ;
156154 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
195193 let is_empty = if let Some ( is_empty) = impl_items. iter ( ) . find ( |i| is_named_self ( cx, i, "is_empty" ) ) {
196194 if cx
197195 . 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 )
199197 {
200198 return ;
201199 } else {
@@ -206,7 +204,7 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
206204 } ;
207205
208206 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 ) {
210208 let def_id = cx. tcx . hir ( ) . local_def_id_from_hir_id ( item. hir_id ) ;
211209 let ty = cx. tcx . type_of ( def_id) ;
212210
0 commit comments