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?
This commit is contained in:
commit
28f424fd1b
@ -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)*); })
|
||||
|
Loading…
x
Reference in New Issue
Block a user