Skip to content

Commit

Permalink
more type annotations to help inference
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 20, 2020
1 parent a39875b commit e46b3c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/librustc/mir/interpret/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ macro_rules! err_exhaust {
// In the `throw_*` macros, avoid `return` to make them work with `try {}`.
#[macro_export]
macro_rules! throw_unsup {
($($tt:tt)*) => { Err(err_unsup!($($tt)*))? };
($($tt:tt)*) => { Err::<!, _>(err_unsup!($($tt)*))? };
}

#[macro_export]
Expand All @@ -59,12 +59,12 @@ macro_rules! throw_unsup_format {

#[macro_export]
macro_rules! throw_inval {
($($tt:tt)*) => { Err(err_inval!($($tt)*))? };
($($tt:tt)*) => { Err::<!, _>(err_inval!($($tt)*))? };
}

#[macro_export]
macro_rules! throw_ub {
($($tt:tt)*) => { Err(err_ub!($($tt)*))? };
($($tt:tt)*) => { Err::<!, _>(err_ub!($($tt)*))? };
}

#[macro_export]
Expand All @@ -74,13 +74,13 @@ macro_rules! throw_ub_format {

#[macro_export]
macro_rules! throw_exhaust {
($($tt:tt)*) => { Err(err_exhaust!($($tt)*))? };
($($tt:tt)*) => { Err::<!, _>(err_exhaust!($($tt)*))? };
}

#[macro_export]
macro_rules! throw_machine_stop {
($($tt:tt)*) => {
Err($crate::mir::interpret::InterpError::MachineStop(Box::new($($tt)*)))?
Err::<!, _>($crate::mir::interpret::InterpError::MachineStop(Box::new($($tt)*)))?
};
}

Expand Down

0 comments on commit e46b3c2

Please sign in to comment.