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
..
2015-02-11 14:49:06 -08:00
2014-12-16 17:08:49 +01:00
2015-02-12 20:36:17 -08:00
2015-03-04 15:59:30 -08:00
2015-02-11 14:49:10 -08:00
2015-01-12 10:09:47 +02:00
2014-12-11 15:33:27 -07:00