]> git.lizzy.rs Git - rust.git/blob - src/libpanic_unwind/hermit.rs
Rollup merge of #68247 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
[rust.git] / src / libpanic_unwind / hermit.rs
1 //! Unwinding for *hermit* target.
2 //!
3 //! Right now we don't support this, so this is just stubs.
4
5 use alloc::boxed::Box;
6 use core::any::Any;
7 use core::ptr;
8
9 pub fn payload() -> *mut u8 {
10     ptr::null_mut()
11 }
12
13 pub unsafe fn cleanup(_ptr: *mut u8) -> Box<dyn Any + Send> {
14     extern "C" {
15         pub fn __rust_abort() -> !;
16     }
17     __rust_abort();
18 }
19
20 pub unsafe fn panic(_data: Box<dyn Any + Send>) -> u32 {
21     extern "C" {
22         pub fn __rust_abort() -> !;
23     }
24     __rust_abort();
25 }