about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-04-02 13:06:12 +0000
committerbors <bors@rust-lang.org>2019-04-02 13:06:12 +0000
commite008e4fde837313d4a72da603ef492a721afc998 (patch)
tree75b10cd677718373adfa76658ae592bb8fac39ad /src/libstd/sys_common
parentf694222887cf31f51e68927716c25736e62f037f (diff)
parentd0d34663375f32f766aa290fa201fdc72ce7ddcf (diff)
downloadrust-e008e4fde837313d4a72da603ef492a721afc998.tar.gz
rust-e008e4fde837313d4a72da603ef492a721afc998.zip
Auto merge of #59632 - Centril:rollup, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #59262 (Remove duplicated code from Iterator::{ne, lt, le, gt, ge})
 - #59286 (Refactor async fn return type lowering)
 - #59444 (Implement useful steps_between for all integers)
 - #59452 (Speed up rustdoc run a bit)
 - #59533 (Support allocating iterators with arenas)
 - #59585 (Fixes for shallow borrows)
 - #59607 (Renames `EvalErrorKind` to `InterpError`)
 - #59613 (SGX target: convert a bunch of panics to aborts)

Failed merges:

 - #59630 (Shrink `mir::Statement`.)

r? @ghost
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs
index 883ab34f07c..4c64e9f3afb 100644
--- a/src/libstd/sys_common/mod.rs
+++ b/src/libstd/sys_common/mod.rs
@@ -28,6 +28,15 @@ macro_rules! rtassert {
     })
 }
 
+#[allow(unused_macros)] // not used on all platforms
+macro_rules! rtunwrap {
+    ($ok:ident, $e:expr) => (if let $ok(v) = $e {
+        v
+    } else {
+        rtabort!(concat!("unwrap failed: ", stringify!($e)));
+    })
+}
+
 pub mod alloc;
 pub mod at_exit_imp;
 #[cfg(feature = "backtrace")]