mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-30 00:03:49 +00:00

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.
24 lines
577 B
Rust
24 lines
577 B
Rust
#![feature(lang_items, panic_unwind)]
|
|
#![no_std]
|
|
|
|
// Since the `unwind` crate is a dependency of the `std` crate, and we have
|
|
// `#![no_std]`, the unwinder is not included in the link command by default.
|
|
// We need to include crate `unwind` manually.
|
|
extern crate unwind;
|
|
|
|
#[panic_handler]
|
|
pub fn begin_panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! {
|
|
loop {}
|
|
}
|
|
|
|
#[lang = "eh_personality"]
|
|
extern "C" fn eh_personality(
|
|
_version: i32,
|
|
_actions: i32,
|
|
_exception_class: u64,
|
|
_exception_object: *mut (),
|
|
_context: *mut (),
|
|
) -> i32 {
|
|
loop {}
|
|
}
|