Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
Fix wrong argument in autoderef process The `overloaded_deref_ty` is a function for derefencing a type which overloads the `Deref` trait. But actually this function never uses the parameter pushed in until this PR. -_-
This commit is contained in:
commit
75561a56ac
@ -114,10 +114,10 @@ impl<'a, 'tcx> Autoderef<'a, 'tcx> {
|
||||
|
||||
let tcx = self.infcx.tcx;
|
||||
|
||||
// <cur_ty as Deref>
|
||||
// <ty as Deref>
|
||||
let trait_ref = TraitRef {
|
||||
def_id: tcx.lang_items().deref_trait()?,
|
||||
substs: tcx.mk_substs_trait(self.cur_ty, &[]),
|
||||
substs: tcx.mk_substs_trait(ty, &[]),
|
||||
};
|
||||
|
||||
let cause = traits::ObligationCause::misc(self.span, self.body_id);
|
||||
|
Loading…
Reference in New Issue
Block a user