about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-12-02 10:59:06 +0100
committerRalf Jung <post@ralfj.de>2019-12-02 10:59:06 +0100
commitff5fcac6c240fd40e24356dd4fab07bbb2b41f5e (patch)
treee65aadaa86cfd4e01d2a3d94cc71d9e6fe6f888e /src
parentf5c81e0a986e4285d3d0fd781a1bd475753eb12c (diff)
downloadrust-ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e.tar.gz
rust-ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e.zip
miri: add throw_machine_stop macro
Diffstat (limited to 'src')
-rw-r--r--src/librustc/mir/interpret/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc/mir/interpret/mod.rs
index 65f4ee88a9c..fff876752db 100644
--- a/src/librustc/mir/interpret/mod.rs
+++ b/src/librustc/mir/interpret/mod.rs
@@ -90,6 +90,13 @@ macro_rules! throw_exhaust {
     ($($tt:tt)*) => { return Err(err_exhaust!($($tt)*).into()) };
 }
 
+#[macro_export]
+macro_rules! throw_machine_stop {
+    ($($tt:tt)*) => {
+        return Err($crate::mir::interpret::InterpError::MachineStop(Box::new($($tt)*)).into())
+    };
+}
+
 mod error;
 mod value;
 mod allocation;