Skip to content

Commit 5585445

Browse files
committed
throw_X macros use err_X macros
1 parent 35417e7 commit 5585445

File tree

1 file changed

+2
-10
lines changed
  • src/librustc/mir/interpret

1 file changed

+2
-10
lines changed

src/librustc/mir/interpret/mod.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,12 @@
22
33
#[macro_export]
44
macro_rules! throw_unsup {
5-
($($tt:tt)*) => {
6-
return Err($crate::mir::interpret::InterpError::Unsupported(
7-
$crate::mir::interpret::UnsupportedOpInfo::$($tt)*
8-
).into())
9-
};
5+
($($tt:tt)*) => { return Err(err_unsup!($($tt)*).into()) };
106
}
117

128
#[macro_export]
139
macro_rules! throw_inval {
14-
($($tt:tt)*) => {
15-
return Err($crate::mir::interpret::InterpError::InvalidProgram(
16-
$crate::mir::interpret::InvalidProgramInfo::$($tt)*
17-
).into())
18-
};
10+
($($tt:tt)*) => { return Err(err_inval!($($tt)*).into()) };
1911
}
2012

2113
#[macro_export]

0 commit comments

Comments
 (0)