Also apply panic_fmt lint suggestions to debug_assert!().

This commit is contained in:
Mara Bos 2020-10-19 00:45:07 +02:00
parent 0a9330c7ef
commit d3b41497fe
5 changed files with 23 additions and 10 deletions

View file

@ -163,6 +163,7 @@ macro_rules! assert_ne {
/// ```
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "debug_assert_macro")]
macro_rules! debug_assert {
($($arg:tt)*) => (if $crate::cfg!(debug_assertions) { $crate::assert!($($arg)*); })
}