[][src]Macro always_assert::never

macro_rules! never {
    ($cond:expr) => { ... };
    ($cond:expr, $fmt:literal $($arg:tt)*) => { ... };
}

Asserts that the condition is never true and returns its actual value.

If the condition is false does nothing and and evaluates to false.

If the condition is true:

  • panics if force feature or debug_assertions are enabled,
  • logs an error if log feature is enabled,
  • evaluates to true.

Accepts format! style arguments.