@@ -473,14 +473,14 @@ impl<'tcx> EmbargoVisitor<'tcx> {
473
473
& mut self ,
474
474
def_id : LocalDefId ,
475
475
inherited_effective_vis : EffectiveVisibility ,
476
- nominal_vis : Option < ty:: Visibility > ,
476
+ max_vis : Option < ty:: Visibility > ,
477
477
level : Level ,
478
478
) {
479
479
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 ) {
481
481
self . changed |= self . effective_visibilities . update (
482
482
def_id,
483
- nominal_vis ,
483
+ max_vis ,
484
484
|| private_vis,
485
485
inherited_effective_vis,
486
486
level,
@@ -774,9 +774,9 @@ impl<'tcx> Visitor<'tcx> for EmbargoVisitor<'tcx> {
774
774
775
775
for impl_item_ref in impl_. items {
776
776
let def_id = impl_item_ref. id . owner_id . def_id ;
777
- let nominal_vis =
777
+ let max_vis =
778
778
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 ) ;
780
780
781
781
if let Some ( impl_item_ev) = self . get ( def_id) {
782
782
self . reach ( def_id, impl_item_ev) . generics ( ) . predicates ( ) . ty ( ) ;
@@ -897,9 +897,9 @@ impl<'tcx> DefIdVisitor<'tcx> for ReachEverythingInTheInterfaceVisitor<'_, 'tcx>
897
897
// All effective visibilities except `reachable_through_impl_trait` are limited to
898
898
// nominal visibility. If any type or trait is leaked farther than that, it will
899
899
// 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 )
901
901
. 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 ) ;
903
903
}
904
904
ControlFlow :: Continue ( ( ) )
905
905
}
0 commit comments