@@ -389,8 +389,8 @@ fn diff_method<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: AssocItem,
389389 ) ;
390390 }
391391
392- let old_pub = old. vis == Public ;
393- let new_pub = new. vis == Public ;
392+ let old_pub = old. visibility ( tcx ) == Public ;
393+ let new_pub = new. visibility ( tcx ) == Public ;
394394
395395 if old_pub && !new_pub {
396396 changes. add_change ( ChangeType :: ItemMadePrivate , old. def_id , None ) ;
@@ -655,14 +655,14 @@ fn diff_traits<'tcx>(
655655 }
656656 ( Some ( old_item) , None ) => {
657657 let change_type = ChangeType :: TraitItemRemoved {
658- defaulted : old_item. defaultness . has_value ( ) ,
658+ defaulted : old_item. defaultness ( tcx ) . has_value ( ) ,
659659 } ;
660660 changes. add_change ( change_type, old, Some ( tcx. def_span ( old_item. def_id ) ) ) ;
661661 id_mapping. add_non_mapped ( old_item. def_id ) ;
662662 }
663663 ( None , Some ( new_item) ) => {
664664 let change_type = ChangeType :: TraitItemAdded {
665- defaulted : new_item. defaultness . has_value ( ) ,
665+ defaulted : new_item. defaultness ( tcx ) . has_value ( ) ,
666666 sealed_trait : old_sealed,
667667 } ;
668668 changes. add_change ( change_type, old, Some ( tcx. def_span ( new_item. def_id ) ) ) ;
@@ -1061,7 +1061,7 @@ fn diff_inherent_impls<'tcx>(
10611061 orig_item. name ,
10621062 item_span,
10631063 item_span,
1064- parent_output && orig_assoc_item. vis == Public ,
1064+ parent_output && orig_assoc_item. visibility ( tcx ) == Public ,
10651065 ) ;
10661066
10671067 // ... determine the set of target impls that serve as candidates
@@ -1082,7 +1082,7 @@ fn diff_inherent_impls<'tcx>(
10821082 . any ( |& ( target_impl_def_id, target_item_def_id) | {
10831083 let target_assoc_item = tcx. associated_item ( target_item_def_id) ;
10841084
1085- if parent_output && target_assoc_item. vis == Public {
1085+ if parent_output && target_assoc_item. visibility ( tcx ) == Public {
10861086 changes. set_output ( orig_item. parent_def_id ) ;
10871087 }
10881088
0 commit comments