macro_rules! debug_assert {
($condition:expr $(,)?) => { ... };
($condition:expr, $($args:expr),* $(,)?) => { ... };
}Expand description
Asserts that a condition is true when debug_assertions are enabled.
If debug_assertions are enabled, this behaves exactly like assert!
(delegating to assert_unary_backend! if the condition evaluates to false).
If debug_assertions are disabled, this macro is a no-op.
debug_assertions can be enabled by setting this bazel label to True
@pigweed//pw_assert/rust:debug_assertions.
§Examples
let x = 5;
pw_assert::debug_assert!(x == 5);