Rust · Macro
panic!
panic! stops the current thread and reports a formatted message. Use it for detected program bugs, not ordinary failures that callers should handle with Result.
Last updated
- Since
- 1.0.0
Syntax
macro_rules! panic { ($($arg:tt)*) => { ... }; }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
ResultOption::unwrapResult::unwrapstd::panic::panic_anystd::panic::set_hookcompile_error!