diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 09:03:16 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 09:06:49 +0000 |
| commit | fcb718b25fbda2bec2255babe212654ba2f4e8c9 (patch) | |
| tree | f28bdb57f4e5383cd9ed7edde55a0eba9de6e779 /tests/ui/panic-runtime | |
| parent | 77232fb9350dbe09821df27f184301475829f1e4 (diff) | |
| download | rust-fcb718b25fbda2bec2255babe212654ba2f4e8c9.tar.gz rust-fcb718b25fbda2bec2255babe212654ba2f4e8c9.zip | |
Fix function signature for rust_eh_personality
While cg_llvm is very lax about mismatched function signatures, cg_clif will crash when there is any mismatch. It could be turned into an error, but without Cranelift changes can't just be ignored.
Diffstat (limited to 'tests/ui/panic-runtime')
| -rw-r--r-- | tests/ui/panic-runtime/incompatible-type.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ui/panic-runtime/incompatible-type.rs b/tests/ui/panic-runtime/incompatible-type.rs index 4cbcfec11c9..f82c23d68c2 100644 --- a/tests/ui/panic-runtime/incompatible-type.rs +++ b/tests/ui/panic-runtime/incompatible-type.rs @@ -21,4 +21,12 @@ pub fn test(_: DropMe) { } #[rustc_std_internal_symbol] -pub unsafe extern "C" fn rust_eh_personality() {} +pub unsafe extern "C" fn rust_eh_personality( + _version: i32, + _actions: i32, + _exception_class: u64, + _exception_object: *mut (), + _context: *mut (), +) -> i32 { + loop {} +} |
