summaryrefslogtreecommitdiffstats
path: root/src/test/ui/panic-handler/panic-handler-duplicate.rs
blob: bd99af999c7978de8bb7e07007620a1420fe9e9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// compile-flags:-C panic=abort

#![feature(lang_items)]
#![no_std]
#![no_main]

use core::panic::PanicInfo;

#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
    loop {}
}

#[lang = "panic_impl"]
fn panic2(info: &PanicInfo) -> ! { //~ ERROR found duplicate lang item `panic_impl`
    loop {}
}