Function rustc_const_eval::interpret::eval_context::format_interp_error

source ยท
pub fn format_interp_error<'tcx>(
    dcx: DiagCtxtHandle<'_>,
    e: InterpErrorInfo<'tcx>,
) -> String
Expand description

Turn the given error into a human-readable string. Expects the string to be printed, so if RUSTC_CTFE_BACKTRACE is set this will show a backtrace of the rustc internals that triggered the error.

This is NOT the preferred way to render an error; use report from const_eval instead. However, this is useful when error messages appear in ICEs.