@@ -978,7 +978,7 @@ pub(crate) fn check_associated_item(
978
978
let sig = tcx. fn_sig ( item. def_id ) . instantiate_identity ( ) ;
979
979
let hir_sig =
980
980
tcx. hir_node_by_def_id ( item_id) . fn_sig ( ) . expect ( "bad signature for method" ) ;
981
- check_fn_or_method ( wfcx, sig, hir_sig. decl , item . def_id . expect_local ( ) ) ;
981
+ check_fn_or_method ( wfcx, sig, hir_sig. decl , item_id ) ;
982
982
check_method_receiver ( wfcx, hir_sig, item, self_ty)
983
983
}
984
984
ty:: AssocKind :: Type { .. } => {
@@ -1655,17 +1655,18 @@ fn check_method_receiver<'tcx>(
1655
1655
}
1656
1656
1657
1657
let span = fn_sig. decl . inputs [ 0 ] . span ;
1658
+ let loc = Some ( WellFormedLoc :: Param { function : method. def_id . expect_local ( ) , param_idx : 0 } ) ;
1658
1659
1659
1660
let sig = tcx. fn_sig ( method. def_id ) . instantiate_identity ( ) ;
1660
1661
let sig = tcx. liberate_late_bound_regions ( method. def_id , sig) ;
1661
- let sig = wfcx. normalize ( span , None , sig) ;
1662
+ let sig = wfcx. normalize ( DUMMY_SP , loc , sig) ;
1662
1663
1663
1664
debug ! ( "check_method_receiver: sig={:?}" , sig) ;
1664
1665
1665
- let self_ty = wfcx. normalize ( span , None , self_ty) ;
1666
+ let self_ty = wfcx. normalize ( DUMMY_SP , loc , self_ty) ;
1666
1667
1667
1668
let receiver_ty = sig. inputs ( ) [ 0 ] ;
1668
- let receiver_ty = wfcx. normalize ( span , None , receiver_ty) ;
1669
+ let receiver_ty = wfcx. normalize ( DUMMY_SP , loc , receiver_ty) ;
1669
1670
1670
1671
// If the receiver already has errors reported, consider it valid to avoid
1671
1672
// unnecessary errors (#58712).
0 commit comments