Add collapse_debuginfo to fmt.rs macros.

This makes location info in defmt logs point to the code calling the macro,
instead of always to fmt.rs as before. Fix works with nightlies
starting with today's, and stable 1.81+.
This commit is contained in:
Dario Nieuwenhuis 2024-06-17 01:38:57 +02:00
parent 1e268a4d3d
commit 6a4ac5bd60
23 changed files with 391 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {

View File

@ -6,6 +6,7 @@ use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))] #[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features."); compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert { macro_rules! assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -17,6 +18,7 @@ macro_rules! assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_eq { macro_rules! assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -28,6 +30,7 @@ macro_rules! assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! assert_ne { macro_rules! assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -39,6 +42,7 @@ macro_rules! assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert { macro_rules! debug_assert {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -50,6 +54,7 @@ macro_rules! debug_assert {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_eq { macro_rules! debug_assert_eq {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -61,6 +66,7 @@ macro_rules! debug_assert_eq {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug_assert_ne { macro_rules! debug_assert_ne {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -72,6 +78,7 @@ macro_rules! debug_assert_ne {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! todo { macro_rules! todo {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -84,6 +91,7 @@ macro_rules! todo {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::core::unreachable!($($x)*) ::core::unreachable!($($x)*)
@ -91,12 +99,14 @@ macro_rules! unreachable {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unreachable { macro_rules! unreachable {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unreachable!($($x)*) ::defmt::unreachable!($($x)*)
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! panic { macro_rules! panic {
($($x:tt)*) => { ($($x:tt)*) => {
{ {
@ -108,6 +118,7 @@ macro_rules! panic {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! trace { macro_rules! trace {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -121,6 +132,7 @@ macro_rules! trace {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! debug { macro_rules! debug {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -134,6 +146,7 @@ macro_rules! debug {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! info { macro_rules! info {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -147,6 +160,7 @@ macro_rules! info {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! warn { macro_rules! warn {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -160,6 +174,7 @@ macro_rules! warn {
}; };
} }
#[collapse_debuginfo(yes)]
macro_rules! error { macro_rules! error {
($s:literal $(, $x:expr)* $(,)?) => { ($s:literal $(, $x:expr)* $(,)?) => {
{ {
@ -174,6 +189,7 @@ macro_rules! error {
} }
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($($x:tt)*) => { ($($x:tt)*) => {
::defmt::unwrap!($($x)*) ::defmt::unwrap!($($x)*)
@ -181,6 +197,7 @@ macro_rules! unwrap {
} }
#[cfg(not(feature = "defmt"))] #[cfg(not(feature = "defmt"))]
#[collapse_debuginfo(yes)]
macro_rules! unwrap { macro_rules! unwrap {
($arg:expr) => { ($arg:expr) => {
match $crate::fmt::Try::into_result($arg) { match $crate::fmt::Try::into_result($arg) {