trait TypeOpInfo<'tcx> {
// Required methods
fn fallback_error(&self, tcx: TyCtxt<'tcx>, span: Span) -> Diag<'tcx>;
fn base_universe(&self) -> UniverseIndex;
fn nice_error(
&self,
mbcx: &mut MirBorrowckCtxt<'_, 'tcx>,
cause: ObligationCause<'tcx>,
placeholder_region: Region<'tcx>,
error_region: Option<Region<'tcx>>
) -> Option<Diag<'tcx>>;
// Provided method
fn report_error(
&self,
mbcx: &mut MirBorrowckCtxt<'_, 'tcx>,
placeholder: PlaceholderRegion,
error_element: RegionElement,
cause: ObligationCause<'tcx>
) { ... }
}
Required Methods§
sourcefn fallback_error(&self, tcx: TyCtxt<'tcx>, span: Span) -> Diag<'tcx>
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.