@@ -377,10 +377,10 @@ fn diff_fn<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: Res, new: Res)
377377
378378/// Given two method items, perform structural checks.
379379fn 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 {
381381 changes. add_change (
382382 ChangeType :: MethodSelfChanged {
383- now_self : new. method_has_self_argument ,
383+ now_self : new. fn_has_self_parameter ,
384384 } ,
385385 old. def_id ,
386386 None ,
@@ -628,8 +628,8 @@ fn diff_traits<'tcx>(
628628 ( Some ( old_item) , Some ( new_item) ) => {
629629 let old_def_id = old_item. def_id ;
630630 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) ;
633633
634634 id_mapping. add_trait_item ( old_res, new_res, old) ;
635635 changes. new_change (
@@ -1127,7 +1127,8 @@ fn is_impl_trait_public<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId) -> bool {
11271127
11281128 // Check if all input types of the trait implementation are public (including `Self`).
11291129 let is_public = trait_ref
1130- . input_types ( )
1130+ . substs
1131+ . types ( )
11311132 . map ( |t| type_visibility ( tcx, t) )
11321133 . all ( |v| v == Visibility :: Public ) ;
11331134
@@ -1275,7 +1276,7 @@ fn match_inherent_impl<'tcx>(
12751276 infcx. tcx . type_of ( orig_item_def_id) ,
12761277 infcx. tcx . type_of ( target_item_def_id) ,
12771278 ) ,
1278- ( AssocKind :: Method , AssocKind :: Method ) => {
1279+ ( AssocKind :: Fn , AssocKind :: Fn ) => {
12791280 diff_method ( changes, tcx, orig_item, target_item) ;
12801281 let orig_sig = infcx. tcx . type_of ( orig_item_def_id) . fn_sig ( tcx) ;
12811282 let target_sig = infcx. tcx . type_of ( target_item_def_id) . fn_sig ( tcx) ;
0 commit comments