]> git.lizzy.rs Git - rust.git/blob - library/panic_unwind/src/hermit.rs
Auto merge of #94021 - tmiasko:inline, r=nagisa
[rust.git] / library / panic_unwind / src / 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
8 pub unsafe fn cleanup(_ptr: *mut u8) -> Box<dyn Any + Send> {
9     extern "C" {
10         pub fn __rust_abort() -> !;
11     }
12     __rust_abort();
13 }
14
15 pub unsafe fn panic(_data: Box<dyn Any + Send>) -> u32 {
16     extern "C" {
17         pub fn __rust_abort() -> !;
18     }
19     __rust_abort();
20 }