diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2019-12-26 19:37:14 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2020-03-02 11:43:07 +0000 |
| commit | 5b682354f2c8bf2c825b6229a6a125435f2053dd (patch) | |
| tree | 30e016d4e826f4ef46c532751ae6a695d1a364e4 /src/libpanic_unwind | |
| parent | bdcc02360f34fe773c38f8ae86111fb831f8ec9e (diff) | |
Fix some minor issues
Diffstat (limited to 'src/libpanic_unwind')
| -rw-r--r-- | src/libpanic_unwind/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index 60ddf70cea5..ad82f22510c 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -32,6 +32,7 @@ #![feature(panic_runtime)] use alloc::boxed::Box; +use core::any::Any; use core::panic::BoxMeUp; // If adding to this list, you should also look at libstd::panicking's identical @@ -70,10 +71,10 @@ extern "C" { mod dwarf; #[no_mangle] -pub unsafe extern "C" fn __rust_panic_cleanup(payload: *mut u8) -> core::raw::TraitObject { +pub unsafe extern "C" fn __rust_panic_cleanup(payload: *mut u8) -> *mut (dyn Any + Send + 'static) { let payload = payload as *mut imp::Payload; let payload = *(payload); - core::mem::transmute(imp::cleanup(payload)) + Box::into_raw(imp::cleanup(payload)) } // Entry point for raising an exception, just delegates to the platform-specific |
