From: Ralf Jung Date: Mon, 2 Dec 2019 09:59:06 +0000 (+0100) Subject: miri: add throw_machine_stop macro X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e;p=rust.git miri: add throw_machine_stop macro --- 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;