pub trait TypeErrCtxtOverflowExt<'a, 'tcx> {
// Required methods
fn report_overflow_error(
&self,
cause: OverflowCause<'tcx>,
span: Span,
suggest_increasing_limit: bool,
mutate: impl FnOnce(&mut Diag<'_>),
) -> !;
fn build_overflow_error(
&self,
cause: OverflowCause<'tcx>,
span: Span,
suggest_increasing_limit: bool,
) -> Diag<'a>;
fn report_overflow_obligation<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool,
) -> !
where T: Upcast<TyCtxt<'tcx>, Predicate<'tcx>> + Clone;
fn report_overflow_obligation_cycle(
&self,
cycle: &[PredicateObligation<'tcx>],
) -> !;
fn report_overflow_no_abort(
&self,
obligation: PredicateObligation<'tcx>,
suggest_increasing_limit: bool,
) -> ErrorGuaranteed;
}
Required Methods§
sourcefn report_overflow_error(
&self,
cause: OverflowCause<'tcx>,
span: Span,
suggest_increasing_limit: bool,
mutate: impl FnOnce(&mut Diag<'_>),
) -> !
fn report_overflow_error( &self, cause: OverflowCause<'tcx>, span: Span, suggest_increasing_limit: bool, mutate: impl FnOnce(&mut Diag<'_>), ) -> !
Reports that an overflow has occurred and halts compilation. We halt compilation unconditionally because it is important that overflows never be masked – they basically represent computations whose result could not be truly determined and thus we can’t say if the program type checks or not – and they are unusual occurrences in any case.
fn build_overflow_error( &self, cause: OverflowCause<'tcx>, span: Span, suggest_increasing_limit: bool, ) -> Diag<'a>
sourcefn report_overflow_obligation<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool,
) -> !
fn report_overflow_obligation<T>( &self, obligation: &Obligation<'tcx, T>, suggest_increasing_limit: bool, ) -> !
Reports that an overflow has occurred and halts compilation. We halt compilation unconditionally because it is important that overflows never be masked – they basically represent computations whose result could not be truly determined and thus we can’t say if the program type checks or not – and they are unusual occurrences in any case.
sourcefn report_overflow_obligation_cycle(
&self,
cycle: &[PredicateObligation<'tcx>],
) -> !
fn report_overflow_obligation_cycle( &self, cycle: &[PredicateObligation<'tcx>], ) -> !
Reports that a cycle was detected which led to overflow and halts
compilation. This is equivalent to report_overflow_obligation
except
that we can give a more helpful error message (and, in particular,
we do not suggest increasing the overflow limit, which is not
going to help).
fn report_overflow_no_abort( &self, obligation: PredicateObligation<'tcx>, suggest_increasing_limit: bool, ) -> ErrorGuaranteed
Object Safety§
Implementations on Foreign Types§
source§impl<'a, 'tcx> TypeErrCtxtOverflowExt<'a, 'tcx> for TypeErrCtxt<'a, 'tcx>
impl<'a, 'tcx> TypeErrCtxtOverflowExt<'a, 'tcx> for TypeErrCtxt<'a, 'tcx>
source§fn report_overflow_error(
&self,
cause: OverflowCause<'tcx>,
span: Span,
suggest_increasing_limit: bool,
mutate: impl FnOnce(&mut Diag<'_>),
) -> !
fn report_overflow_error( &self, cause: OverflowCause<'tcx>, span: Span, suggest_increasing_limit: bool, mutate: impl FnOnce(&mut Diag<'_>), ) -> !
Reports that an overflow has occurred and halts compilation. We halt compilation unconditionally because it is important that overflows never be masked – they basically represent computations whose result could not be truly determined and thus we can’t say if the program type checks or not – and they are unusual occurrences in any case.
source§fn report_overflow_obligation<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool,
) -> !
fn report_overflow_obligation<T>( &self, obligation: &Obligation<'tcx, T>, suggest_increasing_limit: bool, ) -> !
Reports that an overflow has occurred and halts compilation. We halt compilation unconditionally because it is important that overflows never be masked – they basically represent computations whose result could not be truly determined and thus we can’t say if the program type checks or not – and they are unusual occurrences in any case.
source§fn report_overflow_obligation_cycle(
&self,
cycle: &[PredicateObligation<'tcx>],
) -> !
fn report_overflow_obligation_cycle( &self, cycle: &[PredicateObligation<'tcx>], ) -> !
Reports that a cycle was detected which led to overflow and halts
compilation. This is equivalent to report_overflow_obligation
except
that we can give a more helpful error message (and, in particular,
we do not suggest increasing the overflow limit, which is not
going to help).