}
struct Exception {
+ // This needs to be an Option because the object's lifetime follows C++
+ // semantics: when catch_unwind moves the Box out of the exception it must
+ // still leave the exception object in a valid state because its destructor
+ // is still going to be called by __cxa_end_catch..
data: Option<Box<dyn Any + Send>>,
}
extern "C" fn exception_cleanup(ptr: *mut libc::c_void) {
unsafe {
ptr::drop_in_place(ptr as *mut Exception);
+ super::__rust_drop_panic();
}
}
}