pub trait TypeErrCtxtExt<'tcx> {
// Required methods
fn build_overflow_error<T>(
&self,
predicate: &T,
span: Span,
suggest_increasing_limit: bool
) -> DiagnosticBuilder<'tcx>
where T: Display + TypeFoldable<TyCtxt<'tcx>> + Print<'tcx, FmtPrinter<'tcx, 'tcx>>;
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>>;
fn report_overflow_no_abort(
&self,
obligation: PredicateObligation<'tcx>
) -> ErrorGuaranteed;
fn report_fulfillment_errors(
&self,
errors: Vec<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>
);
fn emit_specialized_closure_kind_error(
&self,
obligation: &PredicateObligation<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> Option<ErrorGuaranteed>;
fn fn_arg_obligation(&self, obligation: &PredicateObligation<'tcx>) -> bool;
fn try_conversion_context(
&self,
obligation: &PredicateObligation<'tcx>,
trait_ref: TraitRef<'tcx>,
err: &mut Diagnostic
) -> bool;
fn report_const_param_not_wf(
&self,
ty: Ty<'tcx>,
obligation: &PredicateObligation<'tcx>
) -> DiagnosticBuilder<'tcx>;
}Required Methods§
fn build_overflow_error<T>( &self, predicate: &T, span: Span, suggest_increasing_limit: bool ) -> DiagnosticBuilder<'tcx>
fn report_overflow_error<T>( &self, predicate: &T, span: Span, suggest_increasing_limit: bool, mutate: impl FnOnce(&mut Diagnostic) ) -> !
fn report_overflow_no_abort( &self, obligation: PredicateObligation<'tcx> ) -> ErrorGuaranteed
fn report_fulfillment_errors( &self, errors: Vec<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.
fn emit_specialized_closure_kind_error( &self, obligation: &PredicateObligation<'tcx>, trait_ref: PolyTraitRef<'tcx> ) -> Option<ErrorGuaranteed>
fn fn_arg_obligation(&self, obligation: &PredicateObligation<'tcx>) -> bool
fn try_conversion_context( &self, obligation: &PredicateObligation<'tcx>, trait_ref: TraitRef<'tcx>, err: &mut Diagnostic ) -> bool
fn report_const_param_not_wf( &self, ty: Ty<'tcx>, obligation: &PredicateObligation<'tcx> ) -> DiagnosticBuilder<'tcx>
Object Safety§
This trait is not object safe.