pub trait QueryNormalizeExt<'tcx> {
    // Required method
    fn query_normalize<T>(
        self,
        value: T
    ) -> Result<Normalized<'tcx, T>, NoSolution>
       where T: TypeFoldable<TyCtxt<'tcx>>;
}

Required Methods§

source

fn query_normalize<T>(self, value: T) -> Result<Normalized<'tcx, T>, NoSolution>
where T: TypeFoldable<TyCtxt<'tcx>>,

Normalize value in the context of the inference context, yielding a resulting type, or an error if value cannot be normalized. If you don’t care about regions, you should prefer normalize_erasing_regions, which is more efficient.

If the normalization succeeds and is unambiguous, returns back the normalized value along with various outlives relations (in the form of obligations that must be discharged).

N.B., this will eventually be the main means of normalizing, but for now should be used only when we actually know that normalization will succeed, since error reporting and other details are still “under development”.

This normalization should only be used when the projection does not have possible ambiguity or may not be well-formed.

After codegen, when lifetimes do not matter, it is preferable to instead use TyCtxt::normalize_erasing_regions, which wraps this procedure.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'cx, 'tcx> QueryNormalizeExt<'tcx> for At<'cx, 'tcx>