<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/run-make/debug-assertions/debug.rs, branch 1.3.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.3.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.3.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2015-03-05T22:51:38+00:00</updated>
<entry>
<title>rustc: Add a debug_assertions #[cfg] directive</title>
<updated>2015-03-05T22:51:38+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-02T22:51:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d5d834551cd5a7e7d89ac9f2ae642a93409ed989'/>
<id>urn:sha1:d5d834551cd5a7e7d89ac9f2ae642a93409ed989</id>
<content type='text'>
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]
</content>
</entry>
</feed>
