]> git.lizzy.rs Git - rust.git/blob - library/panic_unwind/src/dummy.rs
Merge commit '40b00f4200fbdeefd11815398cb46394b8cb0a5e' into sync_cg_clif-2021-12-30
[rust.git] / library / panic_unwind / src / dummy.rs
1 //! Unwinding for unsupported target.
2 //!
3 //! Stubs that simply abort for targets that don't support unwinding otherwise.
4
5 use alloc::boxed::Box;
6 use core::any::Any;
7 use core::intrinsics;
8
9 pub unsafe fn cleanup(_ptr: *mut u8) -> Box<dyn Any + Send> {
10     intrinsics::abort()
11 }
12
13 pub unsafe fn panic(_data: Box<dyn Any + Send>) -> u32 {
14     intrinsics::abort()
15 }