Skip to content

Commit

Permalink
rollup merge of rust-lang#20191: lifthrasiir/double-debug_assert
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
alexcrichton committed Dec 30, 2014
2 parents 7b3be9b + 556e3da commit 28f424f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)*); })
Expand Down

0 comments on commit 28f424f

Please sign in to comment.