Fix wrong argument in autoderef process
This commit is contained in:
parent
ec1f28f961
commit
8d2f301283
@ -114,10 +114,10 @@ impl<'a, 'tcx> Autoderef<'a, 'tcx> {
|
|||||||
|
|
||||||
let tcx = self.infcx.tcx;
|
let tcx = self.infcx.tcx;
|
||||||
|
|
||||||
// <cur_ty as Deref>
|
// <ty as Deref>
|
||||||
let trait_ref = TraitRef {
|
let trait_ref = TraitRef {
|
||||||
def_id: tcx.lang_items().deref_trait()?,
|
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);
|
let cause = traits::ObligationCause::misc(self.span, self.body_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user