about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-03-20 23:28:01 +0100
committerRalf Jung <post@ralfj.de>2020-03-20 23:28:01 +0100
commite46b3c2a530316ae9c64ac03ec13e32e0b25e19e (patch)
tree40d369a3dfc985bedce3db7fb1c08d8bfde7bdb3
parenta39875b4dd90be99d870b9b341a516c313076313 (diff)
more type annotations to help inference
-rw-r--r--src/librustc/mir/interpret/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc/mir/interpret/mod.rs
index c5182228e9d..dfe5adb1bbf 100644
--- a/src/librustc/mir/interpret/mod.rs
+++ b/src/librustc/mir/interpret/mod.rs
@@ -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]
@@ -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]
@@ -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)*)))?
     };
 }