Closed
Description
All I was able to find documenting this is an ambiguous mention in the rust reference:
https://github.com/rust-lang/rust/blob/17cae033787aca26b00a8c820c1599926a1fd94d/src/doc/reference.md#conditional-compilation
It would be nice if, for example, the documentation for std::debug_assert!
was updated to mention:
Unlike assert!, debug_assert! statements are only enabled in non optimized builds by default. An optimized build will omit all debug_assert! statements unless -C debug-assertions or -C opt-level=0 is passed to the compiler. This makes debug_assert! useful for checks that are too expensive to be present in a release build but may be helpful during development.
Metadata
Metadata
Assignees
Labels
No labels