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)]`
This commit is contained in:
Jacob Pratt 2026-02-14 23:17:41 -05:00 committed by GitHub
commit 5d2a033b85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,7 +73,7 @@ pub unsafe fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwi
// corresponds with llvm::WebAssembly::Tag::CPP_EXCEPTION // corresponds with llvm::WebAssembly::Tag::CPP_EXCEPTION
// in llvm-project/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h // in llvm-project/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h
const CPP_EXCEPTION_TAG: i32 = 0; const CPP_EXCEPTION_TAG: i32 = 0;
wasm_throw(CPP_EXCEPTION_TAG, exception.cast()) unsafe { wasm_throw(CPP_EXCEPTION_TAG, exception.cast()) }
} }
_ => { _ => {
let _ = exception; let _ = exception;