X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_traits%2Fnormalize_erasing_regions.rs;h=d138ce753b07e4be6eb18047e728050834faf07f;hb=007aabae930d753742f6916d91d3fc8838db08a1;hp=24fa5e97752a67e84e526e67219402bdb473876f;hpb=525d7deb6de47a600945450807c2f3ca04047bba;p=rust.git diff --git a/src/librustc_traits/normalize_erasing_regions.rs b/src/librustc_traits/normalize_erasing_regions.rs index 24fa5e97752..d138ce753b0 100644 --- a/src/librustc_traits/normalize_erasing_regions.rs +++ b/src/librustc_traits/normalize_erasing_regions.rs @@ -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), }