pub fn report_overflow_error<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>,
                                          obligation: &Obligation<'tcx, T>,
                                          suggest_increasing_limit: bool)
                                          -> !
    where T: fmt::Display + TypeFoldable<'tcx>
{
    let predicate =
        infcx.resolve_type_vars_if_possible(&obligation.predicate);
    let mut err = struct_span_err!(infcx.tcx.sess, obligation.cause.span, E0275,
                                   "overflow evaluating the requirement `{}`",
                                   predicate);

    if suggest_increasing_limit {
        suggest_new_overflow_limit(infcx.tcx, &mut err, obligation.cause.span);
    }

    note_obligation_cause(infcx, &mut err, obligation);

    err.emit();
    infcx.tcx.sess.abort_if_errors();
    bug!();
}
/// 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.
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.
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 .
pub fn report_overflow_error<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>,
                                          obligation: &Obligation<'tcx, T>,
                                          suggest_increasing_limit: bool)
                                          -> !
    where T: fmt::Display + TypeFoldable<'tcx>
{
    let predicate =
        infcx.resolve_type_vars_if_possible(&obligation.predicate);
    let mut err = struct_span_err!(infcx.tcx.sess, obligation.cause.span, E0275,
                                   "overflow evaluating the requirement `{}`",
                                   predicate);
    if suggest_increasing_limit {
        suggest_new_overflow_limit(infcx.tcx, &mut err, obligation.cause.span);
    }
    note_obligation_cause(infcx, &mut err, obligation);
    err.emit();
    infcx.tcx.sess.abort_if_errors();
    bug!();
}
pub fn report_overflow_error < ' a , ' tcx , T > ( infcx : & InferCtxt < ' a , ' tcx > , obligation : & Obligation < ' tcx , T > , suggest_increasing_limit : bool ) -> ! where T : fmt :: Display + TypeFoldable < ' tcx > { let predicate = infcx . resolve_type_vars_if_possible ( & obligation . predicate ) ; let mut err = struct_span_err ! ( infcx tcx sess obligation cause span E0275 " " predicate ) ; if suggest_increasing_limit { suggest_new_overflow_limit ( infcx . tcx , & mut err , obligation . cause . span ) ; } note_obligation_cause ( infcx , & mut err , obligation ) ; err . emit ( ) ; infcx . tcx . sess . abort_if_errors ( ) ; bug ! ( ) ; }
Reports that an overflow has occurred and halts compilation.
Reports that an overflow has occurred and halts compilation .
infcx
&InferCtxt<'a, 'tcx>
obligation
&Obligation<'tcx, T>
suggest_increasing_limit
bool
infcx
&InferCtxt<'a, 'tcx>
obligation
&Obligation<'tcx, T>
suggest_increasing_limit
bool