rust/src/liblog
Alex Crichton d5d834551c rustc: Add a debug_assertions #[cfg] directive
This commit is an implementation of [RFC 563][rfc] which adds a new
`cfg(debug_assertions)` directive which is specially recognized and calculated
by the compiler. The flag is turned off at any optimization level greater than 1
and may also be explicitly controlled through the `-C debug-assertions`
flag.

[rfc]: https://github.com/rust-lang/rfcs/pull/563

The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of
the `ndebug` variable and `ndebug` no longer holds any meaning to the standard
library.

Code which was previously relying on `not(ndebug)` to gate expensive code should
be updated to rely on `debug_assertions` instead.

Closes #22492
[breaking-change]
2015-03-05 14:51:38 -08:00
..
directive.rs std: Stabilize FromStr and parse 2015-01-30 08:52:44 -08:00
lib.rs std: Stabilize the env module 2015-02-27 13:41:49 -08:00
macros.rs rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00