Skip to main content

static_assert

Macro static_assert 

Source
macro_rules! static_assert {
    ($cond:expr) => { ... };
    ($cond:expr, $msg:literal) => { ... };
}
Expand description

Compile-time assert. Wraps the const-evaluation idiom in a terse macro so call sites read like static_assert!(cond).

rlx_ir::static_assert!(1 + 1 == 2);
rlx_ir::static_assert!(usize::MAX > 0, "platform sanity");

Failure is a compile error pointing at the macro call site.