Macro compile_fmt::compile_panic
source · macro_rules! compile_panic { ($($arg:tt)+) => { ... }; }
Expand description
Version of the panic!
macro with the ability to format args in compile time.
Arguments have the same syntax as in the compile_args!
macro.
Examples
use compile_fmt::{compile_panic, clip};
const fn unwrap_result(res: Result<(), &str>) {
if let Err(err) = res {
compile_panic!("Encountered an error: ", err => clip(64, "…"));
}
}