Rollup merge of #66951 - RalfJung:miri-machine-stop, r=oli-obk

miri: add throw_machine_stop macro

r? @oli-obk
This helps Miri: https://github.com/rust-lang/miri/pull/1093
This commit is contained in:
Mazdak Farrokhzad 2019-12-03 19:41:52 +01:00 committed by GitHub
commit 71d1286bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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;