Files
rust/tests/ui/panic-handler/panic-handler-duplicate.rs
T
bjorn3 b8813df6cb Use #[panic_handler] rather than #[lang = "panic_impl"]
As preparation for turning #[panic_handler] from a weak lang item into
an EII.
2026-05-25 16:59:11 +02:00

18 lines
292 B
Rust

//@ compile-flags:-C panic=abort
#![feature(lang_items)]
#![no_std]
#![no_main]
use core::panic::PanicInfo;
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
loop {}
}
#[panic_handler]
fn panic2(info: &PanicInfo) -> ! { //~ ERROR found duplicate lang item `panic_impl`
loop {}
}