]> git.lizzy.rs Git - rust.git/blob - src/libpanic_unwind/hermit.rs
Apply review feedback
[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 unsafe fn cleanup(_ptr: *mut u8) -> Box<dyn Any + Send> {
10     extern "C" {
11         pub fn __rust_abort() -> !;
12     }
13     __rust_abort();
14 }
15
16 pub unsafe fn panic(_data: Box<dyn Any + Send>) -> u32 {
17     extern "C" {
18         pub fn __rust_abort() -> !;
19     }
20     __rust_abort();
21 }