diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-06-26 06:36:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-26 06:36:49 +0200 |
| commit | fe2fd8a2d3fce02b07c7a15072812d86092dcbaf (patch) | |
| tree | ab8fc713b93940db4b05f29280f5af4ebd8a73e2 /tests/ui/allocator/no_std-alloc-error-handler-default.rs | |
| parent | 6ad42bf4e7ab81ec3d66a5e47dfe01dc51603c0b (diff) | |
| parent | fdf44db88020c7dad46647aaa81ec05a295e96f2 (diff) | |
Merge pull request #2479 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'tests/ui/allocator/no_std-alloc-error-handler-default.rs')
| -rw-r--r-- | tests/ui/allocator/no_std-alloc-error-handler-default.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs index 8bcf054ac85..51ecf1a6731 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs @@ -6,12 +6,13 @@ //@ compile-flags:-C panic=abort //@ aux-build:helper.rs -#![feature(rustc_private, lang_items)] +#![feature(rustc_private, lang_items, panic_unwind)] #![no_std] #![no_main] extern crate alloc; extern crate libc; +extern crate unwind; // For _Unwind_Resume // ARM targets need these symbols #[no_mangle] @@ -57,7 +58,15 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! { // in these libraries will refer to `rust_eh_personality` if LLVM can not *prove* the contents won't // unwind. So, for this test case we will define the symbol. #[lang = "eh_personality"] -extern "C" fn rust_eh_personality() {} +extern "C" fn rust_eh_personality( + _version: i32, + _actions: i32, + _exception_class: u64, + _exception_object: *mut (), + _context: *mut (), +) -> i32 { + loop {} +} #[derive(Default, Debug)] struct Page(#[allow(dead_code)] [[u64; 32]; 16]); |
