@@ -389,8 +389,8 @@ fn diff_method<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: AssocItem,
389
389
) ;
390
390
}
391
391
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 ;
394
394
395
395
if old_pub && !new_pub {
396
396
changes. add_change ( ChangeType :: ItemMadePrivate , old. def_id , None ) ;
@@ -655,14 +655,14 @@ fn diff_traits<'tcx>(
655
655
}
656
656
( Some ( old_item) , None ) => {
657
657
let change_type = ChangeType :: TraitItemRemoved {
658
- defaulted : old_item. defaultness . has_value ( ) ,
658
+ defaulted : old_item. defaultness ( tcx ) . has_value ( ) ,
659
659
} ;
660
660
changes. add_change ( change_type, old, Some ( tcx. def_span ( old_item. def_id ) ) ) ;
661
661
id_mapping. add_non_mapped ( old_item. def_id ) ;
662
662
}
663
663
( None , Some ( new_item) ) => {
664
664
let change_type = ChangeType :: TraitItemAdded {
665
- defaulted : new_item. defaultness . has_value ( ) ,
665
+ defaulted : new_item. defaultness ( tcx ) . has_value ( ) ,
666
666
sealed_trait : old_sealed,
667
667
} ;
668
668
changes. add_change ( change_type, old, Some ( tcx. def_span ( new_item. def_id ) ) ) ;
@@ -1061,7 +1061,7 @@ fn diff_inherent_impls<'tcx>(
1061
1061
orig_item. name ,
1062
1062
item_span,
1063
1063
item_span,
1064
- parent_output && orig_assoc_item. vis == Public ,
1064
+ parent_output && orig_assoc_item. visibility ( tcx ) == Public ,
1065
1065
) ;
1066
1066
1067
1067
// ... determine the set of target impls that serve as candidates
@@ -1082,7 +1082,7 @@ fn diff_inherent_impls<'tcx>(
1082
1082
. any ( |& ( target_impl_def_id, target_item_def_id) | {
1083
1083
let target_assoc_item = tcx. associated_item ( target_item_def_id) ;
1084
1084
1085
- if parent_output && target_assoc_item. vis == Public {
1085
+ if parent_output && target_assoc_item. visibility ( tcx ) == Public {
1086
1086
changes. set_output ( orig_item. parent_def_id ) ;
1087
1087
}
1088
1088
0 commit comments