mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-18 13:47:07 -04:00
b8813df6cb
As preparation for turning #[panic_handler] from a weak lang item into an EII.
18 lines
292 B
Rust
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 {}
|
|
}
|