diff options
| author | Ralf Jung <post@ralfj.de> | 2019-12-02 10:59:06 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-12-02 10:59:06 +0100 |
| commit | ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e (patch) | |
| tree | e65aadaa86cfd4e01d2a3d94cc71d9e6fe6f888e /src | |
| parent | f5c81e0a986e4285d3d0fd781a1bd475753eb12c (diff) | |
| download | rust-ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e.tar.gz rust-ff5fcac6c240fd40e24356dd4fab07bbb2b41f5e.zip | |
miri: add throw_machine_stop macro
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/mir/interpret/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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; |
