Skip to content

Commit

Permalink
Rollup merge of rust-lang#66951 - RalfJung:miri-machine-stop, r=oli-obk
Browse files Browse the repository at this point in the history
miri: add throw_machine_stop macro

r? @oli-obk
This helps Miri: rust-lang/miri#1093
  • Loading branch information
Centril authored Dec 3, 2019
2 parents 1a9c8e8 + ff5fcac commit 08e7fac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/librustc/mir/interpret/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08e7fac

Please sign in to comment.