assert

Macro assert 

Source
macro_rules! assert {
    ($cond:expr) => { ... };
    ($cond:expr, $($arg:tt)+) => { ... };
}
Expand description

Asserts that a condition is true.

If the assertion fails, a trace message is emitted with the condition, and then the program panics.

ยงExamples

// This will pass
assert!(true);

// This would fail and emit a trace message
// assert!(false);