From 399ab40dbd9f3bca72f589feefbf5bf1bcacf778 Mon Sep 17 00:00:00 2001 From: b-naber Date: Fri, 10 Dec 2021 17:31:40 +0100 Subject: get rid of normalize_generic_arg... queries --- .../rustc_traits/src/normalize_erasing_regions.rs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'compiler/rustc_traits/src') diff --git a/compiler/rustc_traits/src/normalize_erasing_regions.rs b/compiler/rustc_traits/src/normalize_erasing_regions.rs index f7d1ebed7d7..87530cf9961 100644 --- a/compiler/rustc_traits/src/normalize_erasing_regions.rs +++ b/compiler/rustc_traits/src/normalize_erasing_regions.rs @@ -8,30 +8,14 @@ use std::sync::atomic::Ordering; crate fn provide(p: &mut Providers) { *p = Providers { - normalize_generic_arg_after_erasing_regions: |tcx, goal| { - debug!("normalize_generic_arg_after_erasing_regions(goal={:#?})", goal); + try_normalize_generic_arg_after_erasing_regions: |tcx, goal| { + debug!("try_normalize_generic_arg_after_erasing_regions(goal={:#?}", goal); tcx.sess .perf_stats .normalize_generic_arg_after_erasing_regions .fetch_add(1, Ordering::Relaxed); - let (param_env, goal) = goal.into_parts(); - tcx.try_normalize_erasing_regions(param_env, goal).unwrap_or_else(|_| bug!( - "Failed to normalize {:?}, maybe try to call `try_normalize_erasing_regions` instead", - goal - )) - }, - normalize_mir_const_after_erasing_regions: |tcx, goal| { - let (param_env, goal) = goal.into_parts(); - tcx.try_normalize_erasing_regions(param_env, goal).unwrap_or_else(|_| bug!( - "Failed to normalize {:?}, maybe try to call `try_normalize_erasing_regions` instead", - goal - )) - }, - try_normalize_generic_arg_after_erasing_regions: |tcx, goal| { - debug!("try_normalize_generic_arg_after_erasing_regions(goal={:#?}", goal); - try_normalize_after_erasing_regions(tcx, goal) }, try_normalize_mir_const_after_erasing_regions: |tcx, goal| { -- cgit 1.4.1-3-g733a5