diff options
| author | bors <bors@rust-lang.org> | 2013-09-20 12:46:05 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-20 12:46:05 -0700 |
| commit | 2fd3c07242e92b5f43ce8e120d711cde33a7ed1b (patch) | |
| tree | d327eb1e50242cc36b671589ad9bae9bebe300aa /src/libsyntax | |
| parent | ff0aaaf138071ba2656c4c7bddc5267bb3f10e2e (diff) | |
| parent | 833a64d76e1d3ecca5f66469b1a8ec7c97a1c9d9 (diff) | |
| download | rust-2fd3c07242e92b5f43ce8e120d711cde33a7ed1b.tar.gz rust-2fd3c07242e92b5f43ce8e120d711cde33a7ed1b.zip | |
auto merge of #9278 : alexcrichton/rust/ndebug, r=brson
Many people will be very confused that their debug! statements aren't working when they first use rust only to learn that they should have been building with `--cfg debug` the entire time. This inverts the meaning of the flag to instead of enabling debug statements, now it disables debug statements. This way the default behavior is a bit more reasonable, and requires less end-user configuration. Furthermore, this turns on debug by default when building the rustc compiler.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 0bee7895420..82d452bc734 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -715,7 +715,7 @@ pub fn std_macros() -> @str { macro_rules! warn ( ($($arg:tt)*) => (log!(2u32, $($arg)*)) ) macro_rules! info ( ($($arg:tt)*) => (log!(3u32, $($arg)*)) ) macro_rules! debug( ($($arg:tt)*) => ( - if cfg!(debug) { log!(4u32, $($arg)*) } + if cfg!(not(ndebug)) { log!(4u32, $($arg)*) } )) macro_rules! log2( @@ -730,7 +730,7 @@ pub fn std_macros() -> @str { macro_rules! warn2 ( ($($arg:tt)*) => (log2!(2u32, $($arg)*)) ) macro_rules! info2 ( ($($arg:tt)*) => (log2!(3u32, $($arg)*)) ) macro_rules! debug2( ($($arg:tt)*) => ( - if cfg!(debug) { log2!(4u32, $($arg)*) } + if cfg!(not(ndebug)) { log2!(4u32, $($arg)*) } )) macro_rules! fail( |
