macro_rules! const_panic_msg {
($visibility:vis $name:ident = $msg:literal) => { ... };
}Expand description
Declare a const PanicMsg with an &'static str message.
ยงExample
const_panic_msg!(PRIVATE_ERROR = "This is declared with private visibility.");
const_panic_msg!(pub PUBLIC_ERROR = "This is declared with public visiblity.");
// ...
PRIVATE_ERROR.panic();
// ...
PUBLIC_ERROR.debug_assert(left < right);