@@ -377,10 +377,10 @@ fn diff_fn<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: Res, new: Res)
377
377
378
378
/// Given two method items, perform structural checks.
379
379
fn diff_method < ' tcx > ( changes : & mut ChangeSet , tcx : TyCtxt < ' tcx > , old : AssocItem , new : AssocItem ) {
380
- if old. method_has_self_argument != new. method_has_self_argument {
380
+ if old. fn_has_self_parameter != new. fn_has_self_parameter {
381
381
changes. add_change (
382
382
ChangeType :: MethodSelfChanged {
383
- now_self : new. method_has_self_argument ,
383
+ now_self : new. fn_has_self_parameter ,
384
384
} ,
385
385
old. def_id ,
386
386
None ,
@@ -628,8 +628,8 @@ fn diff_traits<'tcx>(
628
628
( Some ( old_item) , Some ( new_item) ) => {
629
629
let old_def_id = old_item. def_id ;
630
630
let new_def_id = new_item. def_id ;
631
- let old_res = Res :: Def ( old_item. def_kind ( ) , old_def_id) ;
632
- let new_res = Res :: Def ( new_item. def_kind ( ) , new_def_id) ;
631
+ let old_res = Res :: Def ( old_item. kind . as_def_kind ( ) , old_def_id) ;
632
+ let new_res = Res :: Def ( new_item. kind . as_def_kind ( ) , new_def_id) ;
633
633
634
634
id_mapping. add_trait_item ( old_res, new_res, old) ;
635
635
changes. new_change (
@@ -1127,7 +1127,8 @@ fn is_impl_trait_public<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId) -> bool {
1127
1127
1128
1128
// Check if all input types of the trait implementation are public (including `Self`).
1129
1129
let is_public = trait_ref
1130
- . input_types ( )
1130
+ . substs
1131
+ . types ( )
1131
1132
. map ( |t| type_visibility ( tcx, t) )
1132
1133
. all ( |v| v == Visibility :: Public ) ;
1133
1134
@@ -1275,7 +1276,7 @@ fn match_inherent_impl<'tcx>(
1275
1276
infcx. tcx . type_of ( orig_item_def_id) ,
1276
1277
infcx. tcx . type_of ( target_item_def_id) ,
1277
1278
) ,
1278
- ( AssocKind :: Method , AssocKind :: Method ) => {
1279
+ ( AssocKind :: Fn , AssocKind :: Fn ) => {
1279
1280
diff_method ( changes, tcx, orig_item, target_item) ;
1280
1281
let orig_sig = infcx. tcx . type_of ( orig_item_def_id) . fn_sig ( tcx) ;
1281
1282
let target_sig = infcx. tcx . type_of ( target_item_def_id) . fn_sig ( tcx) ;
0 commit comments