|
1 | 1 | use rustc::traits::query::NoSolution;
|
2 | 2 | use rustc::ty::query::Providers;
|
3 |
| -use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt}; |
| 3 | +use rustc::ty::subst::GenericArg; |
| 4 | +use rustc::ty::{self, ParamEnvAnd, TyCtxt}; |
4 | 5 | use rustc_infer::infer::TyCtxtInferExt;
|
5 | 6 | use rustc_trait_selection::traits::query::normalize::AtExt;
|
6 | 7 | use rustc_trait_selection::traits::{Normalized, ObligationCause};
|
7 | 8 | use std::sync::atomic::Ordering;
|
8 | 9 |
|
9 | 10 | crate fn provide(p: &mut Providers<'_>) {
|
10 |
| - *p = Providers { normalize_ty_after_erasing_regions, ..*p }; |
| 11 | + *p = Providers { normalize_generic_arg_after_erasing_regions, ..*p }; |
11 | 12 | }
|
12 | 13 |
|
13 |
| -fn normalize_ty_after_erasing_regions<'tcx>( |
| 14 | +fn normalize_generic_arg_after_erasing_regions<'tcx>( |
14 | 15 | tcx: TyCtxt<'tcx>,
|
15 |
| - goal: ParamEnvAnd<'tcx, Ty<'tcx>>, |
16 |
| -) -> Ty<'tcx> { |
17 |
| - debug!("normalize_ty_after_erasing_regions(goal={:#?})", goal); |
| 16 | + goal: ParamEnvAnd<'tcx, GenericArg<'tcx>>, |
| 17 | +) -> GenericArg<'tcx> { |
| 18 | + debug!("normalize_generic_arg_after_erasing_regions(goal={:#?})", goal); |
18 | 19 |
|
19 | 20 | let ParamEnvAnd { param_env, value } = goal;
|
20 |
| - tcx.sess.perf_stats.normalize_ty_after_erasing_regions.fetch_add(1, Ordering::Relaxed); |
| 21 | + tcx.sess.perf_stats.normalize_generic_arg_after_erasing_regions.fetch_add(1, Ordering::Relaxed); |
21 | 22 | tcx.infer_ctxt().enter(|infcx| {
|
22 | 23 | let cause = ObligationCause::dummy();
|
23 | 24 | match infcx.at(&cause, param_env).normalize(&value) {
|
|
0 commit comments