1 | /// `assert!` that's only checked in debug builds and is otherwise an |
---|---|
2 | /// optimization hint in release builds. |
3 | macro_rules! assert_unchecked { |
4 | ($condition:expr $(, $message:expr)* $(,)?) => { |
5 | if cfg!(any(debug_assertions, miri)) { |
6 | assert!($condition $(, $message)*); |
7 | } else { |
8 | $crate::util::assert_unchecked($condition); |
9 | } |
10 | } |
11 | } |
12 |