From 71bbb603f4108bc1f0bc8c8395ec725bb66e7802 Mon Sep 17 00:00:00 2001 From: Ellen Date: Wed, 12 Jan 2022 03:19:52 +0000 Subject: initial revert --- compiler/rustc_borrowck/src/type_check/liveness/trace.rs | 2 +- compiler/rustc_borrowck/src/type_check/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_borrowck/src') diff --git a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs index 094af20f52e..169de23facc 100644 --- a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs +++ b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs @@ -171,7 +171,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> { for (local, location) in drop_used { if !live_locals.contains(&local) { let local_ty = self.cx.body.local_decls[local].ty; - if local_ty.has_free_regions(self.cx.typeck.tcx()) { + if local_ty.has_free_regions() { self.cx.add_drop_live_facts_for(local, local_ty, &[location], &locations); } } diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 1f745f977d4..4c98e964ab0 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -425,7 +425,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> { self.cx.param_env.and(type_op::ascribe_user_type::AscribeUserType::new( constant.literal.ty(), uv.def.did, - UserSubsts { substs: uv.substs(self.tcx()), user_self_ty: None }, + UserSubsts { substs: uv.substs, user_self_ty: None }, )), ) { span_mirbug!( @@ -1969,7 +1969,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { let predicates = self.prove_closure_bounds( tcx, def_id.expect_local(), - uv.substs(tcx), + uv.substs, location, ); self.normalize_and_prove_instantiated_predicates( -- cgit 1.4.1-3-g733a5