Skip to content

Commit 8d2f301

Browse files
committed
Fix wrong argument in autoderef process
1 parent ec1f28f commit 8d2f301

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_typeck/check/autoderef.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ impl<'a, 'tcx> Autoderef<'a, 'tcx> {
114114

115115
let tcx = self.infcx.tcx;
116116

117-
// <cur_ty as Deref>
117+
// <ty as Deref>
118118
let trait_ref = TraitRef {
119119
def_id: tcx.lang_items().deref_trait()?,
120-
substs: tcx.mk_substs_trait(self.cur_ty, &[]),
120+
substs: tcx.mk_substs_trait(ty, &[]),
121121
};
122122

123123
let cause = traits::ObligationCause::misc(self.span, self.body_id);

0 commit comments

Comments
 (0)