) -> InterpResult<'tcx>;
/// Called to evaluate `Abort` MIR terminator.
- fn abort(_ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, !> {
- throw_unsup_format!("aborting execution is not supported")
+ fn abort(_ecx: &mut InterpCx<'mir, 'tcx, Self>, msg: String) -> InterpResult<'tcx, !> {
+ use crate::const_eval::ConstEvalErrKind;
+
+ Err(ConstEvalErrKind::Abort(msg).into())
}
/// Called for all binary operations where the LHS has pointer type.