rust/tests/ui/panics/panic-handler-closures.rs
2025-07-05 03:46:08 +05:00

13 lines
225 B
Rust

//! Check that closures can be used inside `#[panic_handler]` functions.
//@ check-pass
#![crate_type = "rlib"]
#![no_std]
#[panic_handler]
pub fn panicfmt(_: &::core::panic::PanicInfo) -> ! {
|x: u8| x;
loop {}
}