]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_traits/normalize_erasing_regions.rs
Remove unnecessary lift calls
[rust.git] / src / librustc_traits / normalize_erasing_regions.rs
index 412d2ca6dfcff06384242238a22e0b35af2c38fa..d138ce753b07e4be6eb18047e728050834faf07f 100644 (file)
@@ -12,7 +12,7 @@
 }
 
 fn normalize_ty_after_erasing_regions<'tcx>(
-    tcx: TyCtxt<'_, 'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
     goal: ParamEnvAnd<'tcx, Ty<'tcx>>,
 ) -> Ty<'tcx> {
     debug!("normalize_ty_after_erasing_regions(goal={:#?})", goal);
@@ -36,9 +36,8 @@ fn normalize_ty_after_erasing_regions<'tcx>(
                     None,
                 );
 
-                let normalized_value = infcx.resolve_type_vars_if_possible(&normalized_value);
-                let normalized_value = infcx.tcx.erase_regions(&normalized_value);
-                tcx.lift_to_global(&normalized_value).unwrap()
+                let normalized_value = infcx.resolve_vars_if_possible(&normalized_value);
+                infcx.tcx.erase_regions(&normalized_value)
             }
             Err(NoSolution) => bug!("could not fully normalize `{:?}`", value),
         }