rust/src
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
..
compiler-rt@58ab642c30
compiletest std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
doc Auto merge of #22061 - pczarn:quote_matcher_and_attr, r=kmcallister 2015-03-05 04:32:51 +00:00
driver Test fixes and rebase conflicts 2015-01-30 14:53:34 -08:00
etc Use consts instead of statics where appropriate 2015-03-02 17:11:51 +01:00
grammar Bison grammar: fix precedence with ranges followed by blocks 2015-02-10 17:59:02 -08:00
jemalloc@b001609960
liballoc std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libarena Add : Box<_> or ::Box<_> type annotations to various places. 2015-03-03 20:29:01 +01:00
libbacktrace bitrig integration 2015-02-11 14:49:06 -08:00
libcollections Auto merge of #22920 - tshepang:remove-some-warnings, r=huonw 2015-03-04 12:16:51 +00:00
libcore rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00
libcoretest Auto merge of #22920 - tshepang:remove-some-warnings, r=huonw 2015-03-04 12:16:51 +00:00
libflate Use consts instead of statics where appropriate 2015-03-02 17:11:51 +01:00
libfmt_macros int audit - libcore::fmt 2015-02-23 16:07:38 +13:00
libgetopts std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libgraphviz Enable recursion for visit_ty in lint visitor 2015-03-02 15:35:48 -08:00
liblibc unbreak dragonfly build after nacl integration 2015-03-01 16:08:24 +01:00
liblog rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00
librand Auto merge of #22920 - tshepang:remove-some-warnings, r=huonw 2015-03-04 12:16:51 +00:00
librbml Auto merge of #22920 - tshepang:remove-some-warnings, r=huonw 2015-03-04 12:16:51 +00:00
librustc rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00
librustc_back std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
librustc_bitflags Feature-gate #![no_std] 2015-02-07 10:49:58 -08:00
librustc_borrowck Use consts instead of statics where appropriate 2015-03-02 17:11:51 +01:00
librustc_driver std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
librustc_lint Use consts instead of statics where appropriate 2015-03-02 17:11:51 +01:00
librustc_llvm std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
librustc_privacy privacy: walk associated types in trait impls 2015-03-03 01:28:20 -05:00
librustc_resolve remove some compiler warnings 2015-02-26 07:21:26 +02:00
librustc_trans rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00
librustc_typeck Switched to Box::new in many places. 2015-03-03 21:05:55 +01:00
librustdoc std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libserialize std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libstd std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libsyntax Auto merge of #22061 - pczarn:quote_matcher_and_attr, r=kmcallister 2015-03-05 04:32:51 +00:00
libterm std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libtest std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
libunicode Use consts instead of statics where appropriate 2015-03-02 17:11:51 +01:00
llvm@b89c3f039b Update LLVM to rust-llvm-2015-02-19 2015-02-21 13:37:37 +01:00
rt renaming rust_load_self to rust_current_exe 2015-02-11 14:49:11 -08:00
rust-installer@60fd8abfca Upgrade rust-installer 2015-02-12 20:36:17 -08:00
rustbook std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
rustllvm Update LLVM to rust-llvm-2015-02-19 2015-02-21 13:37:37 +01:00
test rustc: Add a debug_assertions #[cfg] directive 2015-03-05 14:51:38 -08:00
snapshots.txt register snapshot 880fb89 2015-02-27 01:48:49 +01:00