diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc/mir/interpret/mod.rs index 65f4c9c47d0a..1ec95c29a4a6 100644 --- a/src/librustc/mir/interpret/mod.rs +++ b/src/librustc/mir/interpret/mod.rs @@ -9,6 +9,11 @@ macro_rules! err_unsup { }; } +#[macro_export] +macro_rules! err_unsup_format { + ($($tt:tt)*) => { err_unsup!(Unsupported(format!($($tt)*))) }; +} + #[macro_export] macro_rules! err_inval { ($($tt:tt)*) => { @@ -27,6 +32,11 @@ macro_rules! err_ub { }; } +#[macro_export] +macro_rules! err_ub_format { + ($($tt:tt)*) => { err_ub!(Ub(format!($($tt)*))) }; +} + #[macro_export] macro_rules! err_panic { ($($tt:tt)*) => {