Crate assert_unchecked

Source
Expand description

Unsafe assertions that allow for optimizations in release mode. All of these assertions if incorrect will invoke undefined behavior (UB) when debug_assertions are disabled, so all usage of these macros must ensure that they will truly never fail.

Macrosยง

assert_eq_unchecked
Asserts that two expressions are equal to each other (using PartialEq).
assert_ne_unchecked
Asserts that two expressions are not equal to each other (using PartialEq).
assert_unchecked
Asserts that a boolean expression is true at runtime.
unreachable_unchecked
Equivalent to the unreachable! macro in builds with debug_assertions on, and otherwise calls core::hint::unreachable_unchecked.