Skip to content

Commit 8a13a7c

Browse files
committed
review comments
1 parent bd890f9 commit 8a13a7c

File tree

1 file changed

+5
-7
lines changed
  • compiler/rustc_borrowck/src/diagnostics

1 file changed

+5
-7
lines changed

compiler/rustc_borrowck/src/diagnostics/mod.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1135,16 +1135,14 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11351135
),
11361136
);
11371137
let infcx = tcx.infer_ctxt().build();
1138-
let ty = infcx.freshen(moved_place.ty(self.body, tcx).ty);
1138+
let ty = tcx.erase_regions(moved_place.ty(self.body, tcx).ty);
11391139
if let ty::Adt(def, substs) = ty.kind()
11401140
&& Some(def.did()) == tcx.lang_items().pin_type()
11411141
&& let ty::Ref(_, _, hir::Mutability::Mut) = substs.type_at(0).kind()
1142-
&& let self_ty = infcx.freshen(
1143-
infcx.replace_bound_vars_with_fresh_vars(
1144-
fn_call_span,
1145-
LateBoundRegionConversionTime::FnCall,
1146-
tcx.fn_sig(method_did).input(0),
1147-
)
1142+
&& let self_ty = infcx.replace_bound_vars_with_fresh_vars(
1143+
fn_call_span,
1144+
LateBoundRegionConversionTime::FnCall,
1145+
tcx.fn_sig(method_did).input(0),
11481146
)
11491147
&& infcx.can_eq(self.param_env, ty, self_ty).is_ok()
11501148
{

0 commit comments

Comments
 (0)