From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- library/panic_unwind/src/hermit.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 library/panic_unwind/src/hermit.rs (limited to 'library/panic_unwind/src/hermit.rs') diff --git a/library/panic_unwind/src/hermit.rs b/library/panic_unwind/src/hermit.rs new file mode 100644 index 000000000..69b9edb77 --- /dev/null +++ b/library/panic_unwind/src/hermit.rs @@ -0,0 +1,20 @@ +//! Unwinding for *hermit* target. +//! +//! Right now we don't support this, so this is just stubs. + +use alloc::boxed::Box; +use core::any::Any; + +pub unsafe fn cleanup(_ptr: *mut u8) -> Box { + extern "C" { + pub fn __rust_abort() -> !; + } + __rust_abort(); +} + +pub unsafe fn panic(_data: Box) -> u32 { + extern "C" { + pub fn __rust_abort() -> !; + } + __rust_abort(); +} -- cgit v1.2.3