Function report

Source
pub(super) fn report<'tcx, C, F>(
    tcx: TyCtxt<'tcx>,
    error: InterpErrorKind<'tcx>,
    span: Span,
    get_span_and_frames: C,
    mk: F,
) -> ErrorHandled
where C: FnOnce() -> (Span, Vec<FrameNote>), F: FnOnce(&mut Diag<'_>, Span, Vec<FrameNote>),
Expand description

Create a diagnostic for a const eval error.

This will use the mk function for adding more information to the error. You can use it to add a stacktrace of current execution according to get_span_and_frames or just give context on where the const eval error happened.