X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_traits%2Fnormalize_erasing_regions.rs;h=d138ce753b07e4be6eb18047e728050834faf07f;hb=007aabae930d753742f6916d91d3fc8838db08a1;hp=412d2ca6dfcff06384242238a22e0b35af2c38fa;hpb=30019ed41324c7018c3432482208d86d43517c6d;p=rust.git diff --git a/src/librustc_traits/normalize_erasing_regions.rs b/src/librustc_traits/normalize_erasing_regions.rs index 412d2ca6dfc..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); @@ -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), }