diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-29 16:35:57 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-29 16:35:57 -0800 |
| commit | 28f424fd1bf22e3c65a7c130c2e57f047c850c2d (patch) | |
| tree | 394e6d71bccb4f874223ecf31b9d8378f3cbaca1 /src/libcore | |
| parent | 7b3be9b854255a897018ec5d81585bdd5f095f19 (diff) | |
| parent | 556e3da55feba88805b480868d84b1bc198bcc9b (diff) | |
| download | rust-28f424fd1bf22e3c65a7c130c2e57f047c850c2d.tar.gz rust-28f424fd1bf22e3c65a7c130c2e57f047c850c2d.zip | |
rollup merge of #20191: lifthrasiir/double-debug_assert
Yes, really. That definition wouldn't work anyway. This also fixes repeated entries for `debug_assert!` from libcore docs. Maybe we should warn such macro definitions in the first place?
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/macros.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 2cd9e7c4509..781dbb0e55a 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -85,16 +85,6 @@ macro_rules! assert { ); } -/// Runtime assertion, only without `--cfg ndebug` -#[macro_export] -macro_rules! debug_assert { - ($(a:tt)*) => ({ - if cfg!(not(ndebug)) { - assert!($($a)*); - } - }) -} - /// Runtime assertion for equality, for details see std::macros #[macro_export] macro_rules! assert_eq { @@ -117,7 +107,7 @@ macro_rules! debug_assert_eq { }) } -/// Runtime assertion, disableable at compile time +/// Runtime assertion, disableable at compile time with `--cfg ndebug` #[macro_export] macro_rules! debug_assert { ($($arg:tt)*) => (if cfg!(not(ndebug)) { assert!($($arg)*); }) |
