From ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 2 Dec 2019 10:59:06 +0100 Subject: [PATCH] miri: add throw_machine_stop macro --- src/librustc/mir/interpret/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.44.0