X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fpanic_unwind%2Fsrc%2Femcc.rs;h=c6d42308596cb2f51ba91c7bc3485a16872413c1;hb=7dc3ace6a962d4c83a1dbd19b3ec9f033356875d;hp=57e817ce6ad5449e6c81f28ca50ec6ad6643db5a;hpb=86c65d2c1ce5aba2c1c74298c3e42696cff1d41a;p=rust.git diff --git a/library/panic_unwind/src/emcc.rs b/library/panic_unwind/src/emcc.rs index 57e817ce6ad..c6d42308596 100644 --- a/library/panic_unwind/src/emcc.rs +++ b/library/panic_unwind/src/emcc.rs @@ -95,8 +95,7 @@ struct CatchData { } pub unsafe fn panic(data: Box) -> u32 { - let sz = mem::size_of_val(&data); - let exception = __cxa_allocate_exception(sz) as *mut Exception; + let exception = __cxa_allocate_exception(mem::size_of::()) as *mut Exception; if exception.is_null() { return uw::_URC_FATAL_PHASE1_ERROR as u32; }