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§

source

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 build_overflow_error( &self, cause: OverflowCause<'tcx>, span: Span, suggest_increasing_limit: bool, ) -> Diag<'a>

source

fn report_overflow_obligation<T>( &self, obligation: &Obligation<'tcx, T>, suggest_increasing_limit: bool, ) -> !
where T: Upcast<TyCtxt<'tcx>, Predicate<'tcx>> + Clone,

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>], ) -> !

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).

source

fn report_overflow_no_abort( &self, obligation: PredicateObligation<'tcx>, suggest_increasing_limit: bool, ) -> ErrorGuaranteed

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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<'_>), ) -> !

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, ) -> !
where T: Upcast<TyCtxt<'tcx>, Predicate<'tcx>> + Clone,

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>], ) -> !

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).

source§

fn build_overflow_error( &self, cause: OverflowCause<'tcx>, span: Span, suggest_increasing_limit: bool, ) -> Diag<'a>

source§

fn report_overflow_no_abort( &self, obligation: PredicateObligation<'tcx>, suggest_increasing_limit: bool, ) -> ErrorGuaranteed

Implementors§