]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll/type_check/mod.rs
Remove unnecessary lift calls
[rust.git] / src / librustc_mir / borrow_check / nll / type_check / mod.rs
index 77e0b54781c94968c08963a1535409097d1f4ea1..9d33b371d9b5539938fdb54061a96c32ff2ed738 100644 (file)
@@ -1866,7 +1866,7 @@ fn ensure_place_sized(&mut self, ty: Ty<'tcx>, span: Span) {
         // `Sized` bound in no way depends on precise regions, so this
         // shouldn't affect `is_sized`.
         let gcx = tcx.global_tcx();
-        let erased_ty = gcx.lift(&tcx.erase_regions(&ty)).unwrap();
+        let erased_ty = tcx.erase_regions(&ty);
         if !erased_ty.is_sized(gcx.at(span), self.param_env) {
             // in current MIR construction, all non-control-flow rvalue
             // expressions evaluate through `as_temp` or `into` a return
@@ -2652,7 +2652,7 @@ fn typeck_mir(&mut self, body: &Body<'tcx>) {
 
     fn normalize<T>(&mut self, value: T, location: impl NormalizeLocation) -> T
     where
-        T: type_op::normalize::Normalizable<'tcx> + Copy,
+        T: type_op::normalize::Normalizable<'tcx> + Copy + 'tcx,
     {
         debug!("normalize(value={:?}, location={:?})", value, location);
         let param_env = self.param_env;