diff options
| author | Ralf Jung <post@ralfj.de> | 2020-05-17 19:37:44 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-05-17 23:38:31 +0200 |
| commit | 2764673dca6badb2ef89450bbdd84b19c317a9c7 (patch) | |
| tree | e087fbebad94323e2d5a506a9def5c59faccc904 /src/libstd/sys/hermit | |
| parent | 34cce58d81f006a5406fcae918db4492e6cf2784 (diff) | |
| download | rust-2764673dca6badb2ef89450bbdd84b19c317a9c7.tar.gz rust-2764673dca6badb2ef89450bbdd84b19c317a9c7.zip | |
abort_internal is safe
Diffstat (limited to 'src/libstd/sys/hermit')
| -rw-r--r-- | src/libstd/sys/hermit/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/sys/hermit/mod.rs b/src/libstd/sys/hermit/mod.rs index f739df88ea6..7bdc1be3b17 100644 --- a/src/libstd/sys/hermit/mod.rs +++ b/src/libstd/sys/hermit/mod.rs @@ -74,8 +74,10 @@ pub extern "C" fn floor(x: f64) -> f64 { unsafe { intrinsics::floorf64(x) } } -pub unsafe fn abort_internal() -> ! { - abi::abort(); +pub fn abort_internal() -> ! { + unsafe { + abi::abort(); + } } // FIXME: just a workaround to test the system @@ -88,7 +90,7 @@ pub fn hashmap_random_keys() -> (u64, u64) { #[cfg(not(test))] #[no_mangle] // NB. used by both libunwind and libpanic_abort -pub unsafe extern "C" fn __rust_abort() { +pub extern "C" fn __rust_abort() { abort_internal(); } |
