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