about summary refs log tree commit diff
path: root/tests/ui/panics/panic-handler-closures.rs
blob: 27fea92572050be508fa8edb948c81b37d810c7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//! 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 {}
}