diff options
Diffstat (limited to 'tests/rustdoc-ui/auxiliary/panic-item.rs')
-rw-r--r-- | tests/rustdoc-ui/auxiliary/panic-item.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/auxiliary/panic-item.rs b/tests/rustdoc-ui/auxiliary/panic-item.rs new file mode 100644 index 000000000..17b26850d --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/panic-item.rs @@ -0,0 +1,17 @@ +// 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() {} |