rust/tests/ui/panic-handler/panic-handler-duplicate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
297 B
Rust
Raw Normal View History

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