pub trait TypeErrCtxtExt<'tcx> {
// Required methods
fn build_overflow_error<T>(
&self,
predicate: &T,
span: Span,
suggest_increasing_limit: bool
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>
where T: Display + TypeFoldable<TyCtxt<'tcx>> + Print<'tcx, FmtPrinter<'tcx, 'tcx>, Output = FmtPrinter<'tcx, 'tcx>>,
<T as Print<'tcx, FmtPrinter<'tcx, 'tcx>>>::Error: Debug;
fn report_overflow_error<T>(
&self,
predicate: &T,
span: Span,
suggest_increasing_limit: bool,
mutate: impl FnOnce(&mut Diagnostic)
) -> !
where T: Display + TypeFoldable<TyCtxt<'tcx>> + Print<'tcx, FmtPrinter<'tcx, 'tcx>, Output = FmtPrinter<'tcx, 'tcx>>,
<T as Print<'tcx, FmtPrinter<'tcx, 'tcx>>>::Error: Debug;
fn report_overflow_no_abort(
&self,
obligation: PredicateObligation<'tcx>
) -> ErrorGuaranteed;
fn report_fulfillment_errors(
&self,
errors: &[FulfillmentError<'tcx>]
) -> ErrorGuaranteed;
fn report_overflow_obligation<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool
) -> !
where T: ToPredicate<'tcx> + Clone;
fn suggest_new_overflow_limit(&self, err: &mut Diagnostic);
fn report_overflow_obligation_cycle(
&self,
cycle: &[PredicateObligation<'tcx>]
) -> !;
fn report_selection_error(
&self,
obligation: PredicateObligation<'tcx>,
root_obligation: &PredicateObligation<'tcx>,
error: &SelectionError<'tcx>
);
}
Required Methods§
fn build_overflow_error<T>( &self, predicate: &T, span: Span, suggest_increasing_limit: bool ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>where T: Display + TypeFoldable<TyCtxt<'tcx>> + Print<'tcx, FmtPrinter<'tcx, 'tcx>, Output = FmtPrinter<'tcx, 'tcx>>, <T as Print<'tcx, FmtPrinter<'tcx, 'tcx>>>::Error: Debug,
fn report_overflow_error<T>( &self, predicate: &T, span: Span, suggest_increasing_limit: bool, mutate: impl FnOnce(&mut Diagnostic) ) -> !where T: Display + TypeFoldable<TyCtxt<'tcx>> + Print<'tcx, FmtPrinter<'tcx, 'tcx>, Output = FmtPrinter<'tcx, 'tcx>>, <T as Print<'tcx, FmtPrinter<'tcx, 'tcx>>>::Error: Debug,
fn report_overflow_no_abort( &self, obligation: PredicateObligation<'tcx> ) -> ErrorGuaranteed
fn report_fulfillment_errors( &self, errors: &[FulfillmentError<'tcx>] ) -> ErrorGuaranteed
fn report_overflow_obligation<T>( &self, obligation: &Obligation<'tcx, T>, suggest_increasing_limit: bool ) -> !where T: ToPredicate<'tcx> + Clone,
fn suggest_new_overflow_limit(&self, err: &mut Diagnostic)
fn report_overflow_obligation_cycle( &self, cycle: &[PredicateObligation<'tcx>] ) -> !
sourcefn report_selection_error(
&self,
obligation: PredicateObligation<'tcx>,
root_obligation: &PredicateObligation<'tcx>,
error: &SelectionError<'tcx>
)
fn report_selection_error( &self, obligation: PredicateObligation<'tcx>, root_obligation: &PredicateObligation<'tcx>, error: &SelectionError<'tcx> )
The root_obligation
parameter should be the root_obligation
field
from a FulfillmentError
. If no FulfillmentError
is available,
then it should be the same as obligation
.