diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2019-10-29 17:31:54 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2019-11-11 15:14:34 -0500 |
| commit | fe88fc03c50be57e1dc12cf308c45dc9c8d6473a (patch) | |
| tree | eff576f45f27f9afa4c17e7736bc83128e4a7a42 /src/libpanic_unwind | |
| parent | caf3cc1fc88430caa61a8f1ae0262c3489a6481a (diff) | |
| download | rust-fe88fc03c50be57e1dc12cf308c45dc9c8d6473a.tar.gz rust-fe88fc03c50be57e1dc12cf308c45dc9c8d6473a.zip | |
Fix up intrinsic implementation
Diffstat (limited to 'src/libpanic_unwind')
| -rw-r--r-- | src/libpanic_unwind/miri.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libpanic_unwind/miri.rs b/src/libpanic_unwind/miri.rs index a2d52638e8b..3b4203c3c6d 100644 --- a/src/libpanic_unwind/miri.rs +++ b/src/libpanic_unwind/miri.rs @@ -1,9 +1,13 @@ +use core::any::Any; +use alloc::boxed::Box; + pub fn payload() -> *mut u8 { core::ptr::null_mut() } -pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 { - core::intrinsics::miri_start_panic(Box::into_raw(data)) +pub unsafe fn panic(data: Box<dyn Any + Send>) -> ! { + let raw_val = core::mem::transmute::<_, u128>(Box::into_raw(data)); + core::intrinsics::miri_start_panic(raw_val) } pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> { |
