rust/tests/rustdoc-ui/auxiliary/panic-item.rs

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

18 lines
312 B
Rust
Raw Normal View History

// no-prefer-dynamic
#![crate_type = "lib"]
#![no_std]
#![feature(lang_items)]
use core::panic::PanicInfo;
use core::sync::atomic::{self, Ordering};
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {
atomic::compiler_fence(Ordering::SeqCst);
}
}
#[lang = "eh_personality"]
fn foo() {}