@@ -473,14 +473,14 @@ impl<'tcx> EmbargoVisitor<'tcx> {
473473 & mut self ,
474474 def_id : LocalDefId ,
475475 inherited_effective_vis : EffectiveVisibility ,
476- nominal_vis : Option < ty:: Visibility > ,
476+ max_vis : Option < ty:: Visibility > ,
477477 level : Level ,
478478 ) {
479479 let private_vis = ty:: Visibility :: Restricted ( self . tcx . parent_module_from_def_id ( def_id) ) ;
480- if Some ( private_vis ) != nominal_vis {
480+ if max_vis != Some ( private_vis ) {
481481 self . changed |= self . effective_visibilities . update (
482482 def_id,
483- nominal_vis ,
483+ max_vis ,
484484 || private_vis,
485485 inherited_effective_vis,
486486 level,
@@ -774,9 +774,9 @@ impl<'tcx> Visitor<'tcx> for EmbargoVisitor<'tcx> {
774774
775775 for impl_item_ref in impl_. items {
776776 let def_id = impl_item_ref. id . owner_id . def_id ;
777- let nominal_vis =
777+ let max_vis =
778778 impl_. of_trait . is_none ( ) . then ( || self . tcx . local_visibility ( def_id) ) ;
779- self . update_eff_vis ( def_id, item_ev, nominal_vis , Level :: Direct ) ;
779+ self . update_eff_vis ( def_id, item_ev, max_vis , Level :: Direct ) ;
780780
781781 if let Some ( impl_item_ev) = self . get ( def_id) {
782782 self . reach ( def_id, impl_item_ev) . generics ( ) . predicates ( ) . ty ( ) ;
@@ -897,9 +897,9 @@ impl<'tcx> DefIdVisitor<'tcx> for ReachEverythingInTheInterfaceVisitor<'_, 'tcx>
897897 // All effective visibilities except `reachable_through_impl_trait` are limited to
898898 // nominal visibility. If any type or trait is leaked farther than that, it will
899899 // produce type privacy errors on any use, so we don't consider it leaked.
900- let nominal_vis = ( self . level != Level :: ReachableThroughImplTrait )
900+ let max_vis = ( self . level != Level :: ReachableThroughImplTrait )
901901 . then ( || self . ev . tcx . local_visibility ( def_id) ) ;
902- self . ev . update_eff_vis ( def_id, self . effective_vis , nominal_vis , self . level ) ;
902+ self . ev . update_eff_vis ( def_id, self . effective_vis , max_vis , self . level ) ;
903903 }
904904 ControlFlow :: Continue ( ( ) )
905905 }
0 commit comments