Skip to content

Commit 5d2a033

Browse files
authored
Rollup merge of #152472 - lizan:wasm, r=Mark-Simulacrum
unwind/wasm: fix compile error by wrapping wasm_throw in unsafe block This fix rust-std compile error on wasm32-unknown-unknown with panic=unwind because of `#![deny(unsafe_op_in_unsafe_fn)]`
2 parents 9369cff + 78dc744 commit 5d2a033

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/unwind/src/wasm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub unsafe fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwi
7373
// corresponds with llvm::WebAssembly::Tag::CPP_EXCEPTION
7474
// in llvm-project/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h
7575
const CPP_EXCEPTION_TAG: i32 = 0;
76-
wasm_throw(CPP_EXCEPTION_TAG, exception.cast())
76+
unsafe { wasm_throw(CPP_EXCEPTION_TAG, exception.cast()) }
7777
}
7878
_ => {
7979
let _ = exception;

0 commit comments

Comments
 (0)