Trait rustc_trait_selection::traits::query::type_op::TypeOp

source ·
pub trait TypeOp<'tcx>: Sized + Debug {
    type Output: Debug;
    type ErrorInfo;

    // Required method
    fn fully_perform(
        self,
        infcx: &InferCtxt<'tcx>,
        span: Span
    ) -> Result<TypeOpOutput<'tcx, Self>, ErrorGuaranteed>;
}
Expand description

“Type ops” are used in NLL to perform some particular action and extract out the resulting region constraints (or an error if it cannot be completed).

Required Associated Types§

Required Methods§

source

fn fully_perform( self, infcx: &InferCtxt<'tcx>, span: Span ) -> Result<TypeOpOutput<'tcx, Self>, ErrorGuaranteed>

Processes the operation and all resulting obligations, returning the final result along with any region constraints (they will be given over to the NLL region solver).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'tcx, Q> TypeOp<'tcx> for ParamEnvAnd<'tcx, Q>
where Q: QueryTypeOp<'tcx>,

§

type Output = <Q as QueryTypeOp<'tcx>>::QueryResponse

§

type ErrorInfo = Canonical<TyCtxt<'tcx>, ParamEnvAnd<'tcx, Q>>

source§

fn fully_perform( self, infcx: &InferCtxt<'tcx>, span: Span ) -> Result<TypeOpOutput<'tcx, Self>, ErrorGuaranteed>

Implementors§

source§

impl<'tcx, F, R> TypeOp<'tcx> for CustomTypeOp<F>
where F: FnOnce(&ObligationCtxt<'_, 'tcx>) -> Result<R, NoSolution>, R: Debug + TypeFoldable<TyCtxt<'tcx>>,

§

type Output = R

§

type ErrorInfo = !