@@ -700,14 +700,6 @@ impl<'tcx> EmbargoVisitor<'tcx> {
700
700
}
701
701
702
702
impl < ' tcx > Visitor < ' tcx > for EmbargoVisitor < ' tcx > {
703
- type NestedFilter = nested_filter:: All ;
704
-
705
- /// We want to visit items in the context of their containing
706
- /// module and so forth, so supply a crate for doing a deep walk.
707
- fn nested_visit_map ( & mut self ) -> Self :: Map {
708
- self . tcx . hir ( )
709
- }
710
-
711
703
fn visit_item ( & mut self , item : & ' tcx hir:: Item < ' tcx > ) {
712
704
let item_ev = match item. kind {
713
705
hir:: ItemKind :: Impl { .. } => {
@@ -915,15 +907,6 @@ impl<'tcx> Visitor<'tcx> for EmbargoVisitor<'tcx> {
915
907
}
916
908
}
917
909
}
918
-
919
- intravisit:: walk_item ( self , item) ;
920
- }
921
-
922
- fn visit_block ( & mut self , b : & ' tcx hir:: Block < ' tcx > ) {
923
- // Blocks can have public items, for example impls, but they always
924
- // start as completely private regardless of publicity of a function,
925
- // constant, type, field, etc., in which this block resides.
926
- intravisit:: walk_block ( self , b) ;
927
910
}
928
911
}
929
912
@@ -2210,7 +2193,7 @@ fn effective_visibilities(tcx: TyCtxt<'_>, (): ()) -> &EffectiveVisibilities {
2210
2193
2211
2194
visitor. effective_visibilities . check_invariants ( tcx, true ) ;
2212
2195
loop {
2213
- tcx. hir ( ) . walk_toplevel_module ( & mut visitor) ;
2196
+ tcx. hir ( ) . visit_all_item_likes_in_crate ( & mut visitor) ;
2214
2197
if visitor. changed {
2215
2198
visitor. changed = false ;
2216
2199
} else {
0 commit comments