trait TypeOpInfo<'tcx> {
    // Required methods
    fn fallback_error(&self, tcx: TyCtxt<'tcx>, span: Span) -> Diag<'tcx>;
    fn base_universe(&self) -> UniverseIndex;
    fn nice_error<'infcx>(
        &self,
        mbcx: &mut MirBorrowckCtxt<'_, '_, 'infcx, 'tcx>,
        cause: ObligationCause<'tcx>,
        placeholder_region: Region<'tcx>,
        error_region: Option<Region<'tcx>>,
    ) -> Option<Diag<'infcx>>;

    // Provided method
    fn report_error(
        &self,
        mbcx: &mut MirBorrowckCtxt<'_, '_, '_, 'tcx>,
        placeholder: PlaceholderRegion,
        error_element: RegionElement,
        cause: ObligationCause<'tcx>,
    ) { ... }
}

Required Methods§

source

fn fallback_error(&self, tcx: TyCtxt<'tcx>, span: Span) -> Diag<'tcx>

Returns an error to be reported if rerunning the type op fails to recover the error’s cause.

source

fn base_universe(&self) -> UniverseIndex

source

fn nice_error<'infcx>( &self, mbcx: &mut MirBorrowckCtxt<'_, '_, 'infcx, 'tcx>, cause: ObligationCause<'tcx>, placeholder_region: Region<'tcx>, error_region: Option<Region<'tcx>>, ) -> Option<Diag<'infcx>>

Provided Methods§

source

fn report_error( &self, mbcx: &mut MirBorrowckCtxt<'_, '_, '_, 'tcx>, placeholder: PlaceholderRegion, error_element: RegionElement, cause: ObligationCause<'tcx>, )

Implementors§

source§

impl<'tcx> TypeOpInfo<'tcx> for InstantiateOpaqueType<'tcx>

source§

impl<'tcx> TypeOpInfo<'tcx> for AscribeUserTypeQuery<'tcx>

source§

impl<'tcx> TypeOpInfo<'tcx> for PredicateQuery<'tcx>

source§

impl<'tcx, T> TypeOpInfo<'tcx> for NormalizeQuery<'tcx, T>
where T: Copy + Display + TypeFoldable<TyCtxt<'tcx>> + 'tcx,