trait TypeOpInfo<'tcx> {
// Required methods
fn fallback_error(
&self,
tcx: TyCtxt<'tcx>,
span: Span
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>;
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<DiagnosticBuilder<'tcx, ErrorGuaranteed>>;
// 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
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>
fn fallback_error( &self, tcx: TyCtxt<'tcx>, span: Span ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>
Returns an error to be reported if rerunning the type op fails to recover the error’s cause.