]> 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 24fa5e97752a67e84e526e67219402bdb473876f..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);
@@ -37,8 +37,7 @@ fn normalize_ty_after_erasing_regions<'tcx>(
                 );
 
                 let normalized_value = infcx.resolve_vars_if_possible(&normalized_value);
-                let normalized_value = infcx.tcx.erase_regions(&normalized_value);
-                tcx.lift_to_global(&normalized_value).unwrap()
+                infcx.tcx.erase_regions(&normalized_value)
             }
             Err(NoSolution) => bug!("could not fully normalize `{:?}`", value),
         }