const_panic

Macro const_panic 

Source
macro_rules! const_panic {
    ($default:expr) => { ... };
    () => { ... };
}
Expand description

Signal a fatal error when evaluating a constant context.

Can be passed an expression for type checking.

Note: Rust does not currently support panicking in const contexts in stable versions, so this macro will just exhaust the evaluation limit to force a compiler error.