blob: 3ba0bec71b7bf7bbd7f00e0ca9a4c38f5d86d151 [file] [edit]
//! Unwinding for unsupported target.
//!
//! Stubs that simply abort for targets that don't support unwinding otherwise.
use alloc::boxed::Box;
use core::any::Any;
unsafe extern "Rust" {
// This is defined in std::rt
#[rustc_std_internal_symbol]
safe fn __rust_abort() -> !;
}
pub(crate) unsafe fn cleanup(_ptr: *mut u8) -> Box<dyn Any + Send> {
__rust_abort()
}
pub(crate) unsafe fn panic(_data: Box<dyn Any + Send>) -> u32 {
__rust_abort()
}