Skip to content

Commit 28f424f

Browse files
committed
rollup merge of rust-lang#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?
2 parents 7b3be9b + 556e3da commit 28f424f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/libcore/macros.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ macro_rules! assert {
8585
);
8686
}
8787

88-
/// Runtime assertion, only without `--cfg ndebug`
89-
#[macro_export]
90-
macro_rules! debug_assert {
91-
($(a:tt)*) => ({
92-
if cfg!(not(ndebug)) {
93-
assert!($($a)*);
94-
}
95-
})
96-
}
97-
9888
/// Runtime assertion for equality, for details see std::macros
9989
#[macro_export]
10090
macro_rules! assert_eq {
@@ -117,7 +107,7 @@ macro_rules! debug_assert_eq {
117107
})
118108
}
119109

120-
/// Runtime assertion, disableable at compile time
110+
/// Runtime assertion, disableable at compile time with `--cfg ndebug`
121111
#[macro_export]
122112
macro_rules! debug_assert {
123113
($($arg:tt)*) => (if cfg!(not(ndebug)) { assert!($($arg)*); })

0 commit comments

Comments
 (0)