You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
trace! code still present in the generated non-release binary. #386
When using max_level_debug feature, and compiling a non-release build, my expectation would be that trace! code is not present in the binary. As mentioned in the documentation:
Log levels can be statically disabled at compile time via Cargo features. Log invocations at disabled levels will be skipped and will not even be present in the resulting binary
However, the binary still contains some code which is not optimized away by the Rust compiler:
Activity
KodrAus commentedon Nov 15, 2021
Interesting! Is this still the case today? I’m guessing that’s coming from these checks? https://github.com/rust-lang/log/blob/master/src/macros.rs#L34
I wonder if that’s got anything to do with the
PartialOrdimpl being non-const? It is#[inline]though.docs: fix grammatical error (rust-lang#386)