1*5054d400SAlex Crichton #![cfg(not(unix))] // gets `cargo clippy` working 2*5054d400SAlex Crichton 3*5054d400SAlex Crichton use core::panic::PanicInfo; 4*5054d400SAlex Crichton 5*5054d400SAlex Crichton #[panic_handler] handler(_info: &PanicInfo) -> !6*5054d400SAlex Crichtonfn handler(_info: &PanicInfo) -> ! { 7*5054d400SAlex Crichton // NB: should ideally print something here but for this example this is left 8*5054d400SAlex Crichton // out. A more complete embedding would likely turn `info` into a 9*5054d400SAlex Crichton // stack-allocated string and then pass that as a message to the outer 10*5054d400SAlex Crichton // system to get printed and trigger a failure. 11*5054d400SAlex Crichton loop {} 12*5054d400SAlex Crichton } 13