]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir/src/interpret/machine.rs
abort() now takes a msg parameter
[rust.git] / compiler / rustc_mir / src / interpret / machine.rs
index 66dbacb2f9d4d39af4c2b0421d5f3baf03c1dd27..1c13cdbc6e67d4afc185a9f7d3bb6189149af602 100644 (file)
@@ -176,8 +176,10 @@ fn assert_panic(
     ) -> 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.