rendy_util/slow.rs
1//! Macros that do run-time safety checks. These can be disabled, but this increases
2//! the risk of unsafe behavior.
3//!
4
5/// `assert!` that is exists only if `"no-slow-safety-checks"` feature is not enabled.
6#[macro_export]
7macro_rules! rendy_slow_assert {
8 ($($tt:tt)*) => {
9 with_slow_safety_checks!(assert!($($tt)*));
10 }
11}
12
13/// `assert_eq!` that is exists only if `"no-slow-safety-checks"` feature is not enabled.
14#[macro_export]
15macro_rules! rendy_slow_assert_eq {
16 ($($tt:tt)*) => {
17 with_slow_safety_checks!(assert_eq!($($tt)*));
18 }
19}
20
21/// `assert_ne!` that is exists only if `"no-slow-safety-checks"` feature is not enabled.
22#[macro_export]
23macro_rules! rendy_slow_assert_ne {
24 ($($tt:tt)*) => {
25 with_slow_safety_checks!(assert_ne!($($tt)*));
26 }
27}