1 2 3 4 5 6 7 8 9 10 11 12
macro_rules! if_loom { ($($t:tt)*) => {{ #[cfg(loom)] const LOOM: bool = true; #[cfg(not(loom))] const LOOM: bool = false; if LOOM { $($t)* } }} }