Skip to content

Commit e46b3c2

Browse files
committed
more type annotations to help inference
1 parent a39875b commit e46b3c2

File tree

1 file changed

+5
-5
lines changed
  • src/librustc/mir/interpret

1 file changed

+5
-5
lines changed

src/librustc/mir/interpret/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ macro_rules! err_exhaust {
4949
// In the `throw_*` macros, avoid `return` to make them work with `try {}`.
5050
#[macro_export]
5151
macro_rules! throw_unsup {
52-
($($tt:tt)*) => { Err(err_unsup!($($tt)*))? };
52+
($($tt:tt)*) => { Err::<!, _>(err_unsup!($($tt)*))? };
5353
}
5454

5555
#[macro_export]
@@ -59,12 +59,12 @@ macro_rules! throw_unsup_format {
5959

6060
#[macro_export]
6161
macro_rules! throw_inval {
62-
($($tt:tt)*) => { Err(err_inval!($($tt)*))? };
62+
($($tt:tt)*) => { Err::<!, _>(err_inval!($($tt)*))? };
6363
}
6464

6565
#[macro_export]
6666
macro_rules! throw_ub {
67-
($($tt:tt)*) => { Err(err_ub!($($tt)*))? };
67+
($($tt:tt)*) => { Err::<!, _>(err_ub!($($tt)*))? };
6868
}
6969

7070
#[macro_export]
@@ -74,13 +74,13 @@ macro_rules! throw_ub_format {
7474

7575
#[macro_export]
7676
macro_rules! throw_exhaust {
77-
($($tt:tt)*) => { Err(err_exhaust!($($tt)*))? };
77+
($($tt:tt)*) => { Err::<!, _>(err_exhaust!($($tt)*))? };
7878
}
7979

8080
#[macro_export]
8181
macro_rules! throw_machine_stop {
8282
($($tt:tt)*) => {
83-
Err($crate::mir::interpret::InterpError::MachineStop(Box::new($($tt)*)))?
83+
Err::<!, _>($crate::mir::interpret::InterpError::MachineStop(Box::new($($tt)*)))?
8484
};
8585
}
8686

0 commit comments

Comments
 (0)