I'm looking for a way to compile some code in my debug build, but not in my release build. More specifically I would like a part of a function not to be compiled on release. In other word, something similar to C/C++ assert with NDEBUG define. I'm aware of conditionnal compilation
#[cfg(target_os = "macos")]
but from what I understand, it's function wise only (I don't want duplicated code), and it's not possible to create our own options.
Any help is appreciated !