]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/sgx/abi/panic.rs
SGX target: fix std unit tests
[rust.git] / src / libstd / sys / sgx / abi / panic.rs
index b2afacc70b82e504a5925675d12d1473eff03a57..de86394b4b88cdfd8013b57b089988f60567df04 100644 (file)
@@ -1,7 +1,7 @@
 use super::usercalls::{alloc::UserRef, self};
-use cmp;
-use io::{self, Write};
-use mem;
+use crate::cmp;
+use crate::io::{self, Write};
+use crate::mem;
 
 extern "C" {
     fn take_debug_panic_buf_ptr() -> *mut u8;
@@ -49,7 +49,7 @@ fn flush(&mut self) -> io::Result<()> {
     }
 }
 
-#[no_mangle]
+#[cfg_attr(not(test), no_mangle)]
 pub extern "C" fn panic_msg(msg: &str) -> ! {
     let _ = SgxPanicOutput::new().map(|mut out| out.write(msg.as_bytes()));
     usercalls::exit(true)