diff --git a/src/overflow.rs b/src/overflow.rs index d81bf24dbd1..29fd2da32b8 100644 --- a/src/overflow.rs +++ b/src/overflow.rs @@ -44,6 +44,7 @@ const SPECIAL_CASE_MACROS: &[(&str, usize)] = &[ ("panic!", 0), ("unreachable!", 0), // From the `log` crate. + ("trace!", 0), ("debug!", 0), ("error!", 0), ("info!", 0), diff --git a/tests/source/macros.rs b/tests/source/macros.rs index 3b286579ca8..0e00da00842 100644 --- a/tests/source/macros.rs +++ b/tests/source/macros.rs @@ -270,6 +270,10 @@ fn special_case_macros() { debug!("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); debug!("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26); + trace!("{}", 1); + trace!("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); + trace!("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26); + error!("{}", 1); error!("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); error!("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26); diff --git a/tests/target/macros.rs b/tests/target/macros.rs index 7b4574349df..6f95b1d1b5c 100644 --- a/tests/target/macros.rs +++ b/tests/target/macros.rs @@ -570,6 +570,41 @@ fn special_case_macros() { 26 ); + trace!("{}", 1); + trace!( + "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ); + trace!( + "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26 + ); + error!("{}", 1); error!( "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",