diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 09:04:36 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-24 09:06:49 +0000 |
| commit | 659da5843bd0c176c47ca190d2b1cfaa690ffa09 (patch) | |
| tree | 4136085f2f50bd74fea802a08669f4085d71ab9c /tests/ui/no_std | |
| parent | fcb718b25fbda2bec2255babe212654ba2f4e8c9 (diff) | |
| download | rust-659da5843bd0c176c47ca190d2b1cfaa690ffa09.tar.gz rust-659da5843bd0c176c47ca190d2b1cfaa690ffa09.zip | |
Fix a bunch of missing unwinder related definitions
cg_llvm likely just optimizes out their references for these tests, but cg_clif doesn't and would thus give a linker error.
Diffstat (limited to 'tests/ui/no_std')
| -rw-r--r-- | tests/ui/no_std/simple-runs.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/no_std/simple-runs.rs b/tests/ui/no_std/simple-runs.rs index 8931ac7ed11..af44dfec311 100644 --- a/tests/ui/no_std/simple-runs.rs +++ b/tests/ui/no_std/simple-runs.rs @@ -4,6 +4,7 @@ //@ compile-flags: -Cpanic=abort //@ ignore-wasm different `main` convention +#![feature(lang_items)] #![no_std] #![no_main] @@ -35,6 +36,17 @@ fn panic_handler(_info: &PanicInfo<'_>) -> ! { loop {} } +#[lang = "eh_personality"] +extern "C" fn rust_eh_personality( + _version: i32, + _actions: i32, + _exception_class: u64, + _exception_object: *mut (), + _context: *mut (), +) -> i32 { + loop {} +} + #[no_mangle] extern "C" fn main(_argc: c_int, _argv: *const *const c_char) -> c_int { 0 |
