]> git.lizzy.rs Git - rust.git/commitdiff
miri: add throw_machine_stop macro
authorRalf Jung <post@ralfj.de>
Mon, 2 Dec 2019 09:59:06 +0000 (10:59 +0100)
committerRalf Jung <post@ralfj.de>
Mon, 2 Dec 2019 09:59:06 +0000 (10:59 +0100)
src/librustc/mir/interpret/mod.rs

index 65f4ee88a9c2fa388a7bb5b5db8ff373aa8c7252..fff876752db55ab971a45126f726f5a81742f092 100644 (file)
@@ -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;