]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/sgx/mod.rs
SGX target: improve panic & exit handling
[rust.git] / src / libstd / sys / sgx / mod.rs
index 823050a398f1a05036bcd9c2bfb2bbbb8f897aa9..f2593c35bed14c6c79103d2716e6b0a098e9627f 100644 (file)
@@ -17,6 +17,7 @@
 pub mod cmath;
 pub mod condvar;
 pub mod env;
+pub mod ext;
 pub mod fd;
 pub mod fs;
 pub mod memchr;
@@ -124,7 +125,7 @@ pub unsafe fn strlen(mut s: *const c_char) -> usize {
 }
 
 pub unsafe fn abort_internal() -> ! {
-    abi::panic::panic_exit()
+    abi::panic::usercall_exit(true)
 }
 
 pub fn hashmap_random_keys() -> (u64, u64) {
@@ -141,3 +142,9 @@ fn rdrand64() -> u64 {
     }
     (rdrand64(), rdrand64())
 }
+
+pub use sys_common::{AsInner, FromInner, IntoInner};
+
+pub trait TryIntoInner<Inner>: Sized {
+    fn try_into_inner(self) -> Result<Inner, Self>;
+}