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 withdebug_assertions
on, and otherwise callscore::hint::unreachable_unchecked
.