panic_halt/lib.rs
1//! Set the panicking behavior to halt
2//!
3//! This crate contains an implementation of `panic_fmt` that simply halt in an infinite loop.
4//!
5//! # Usage
6//!
7//! ``` ignore
8//! #![no_std]
9//!
10//! extern crate panic_halt;
11//!
12//! fn main() {
13//! panic!("argument is ignored");
14//! }
15//! ```
16//!
17//! # Breakable symbols
18//!
19//! With the panic handler being `#[inline(never)]` the symbol `rust_begin_unwind` will be
20//! available to place a breakpoint on to halt when a panic is happening.
21
22#![deny(missing_docs)]
23#![deny(warnings)]
24#![no_std]
25
26use core::panic::PanicInfo;
27
28#[inline(never)]
29#[panic_handler]
30fn panic(_info: &PanicInfo) -> ! {
31 loop {}
32}