# Function rustc_trait_selection::traits::project::normalize_projection_type

source ·

    pub fn normalize_projection_type<'a, 'b, 'tcx>(
        selcx: &'a mut SelectionContext<'b, 'tcx>,
        param_env: ParamEnv<'tcx>,
        projection_ty: AliasTy<'tcx>,
        cause: ObligationCause<'tcx>,
        depth: usize,
        obligations: &mut Vec<PredicateObligation<'tcx>>
    ) -> Term<'tcx>

Expand description

The guts of `normalize`: normalize a specific projection like `<T as Trait>::Item`. The result is always a type (and possibly additional obligations). If ambiguity arises, which implies that there are unresolved type variables in the projection, we will instantiate it with a fresh type variable `$X` and generate a new obligation `<T as Trait>::Item == $X` for later.