We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dbg!
1 parent b3dae36 commit ba135d4Copy full SHA for ba135d4
src/stdio.rs
@@ -85,3 +85,21 @@ mod nativestdio {
85
pub use self::nativestdio::Stdio;
86
#[cfg(riot_module_stdio_uart)]
87
pub use self::regular::Stdio;
88
+
89
+// Copied and adapted from Rust 1.32.0
90
+#[macro_export]
91
+macro_rules! dbg {
92
+ ($val:expr) => {
93
+ match $val {
94
+ tmp => {
95
+ use riot_wrappers::stdio::Stdio;
96
+ use core::fmt::Write;
97
+ writeln!(Stdio { }, "[{}:{}] {} = {:#?}",
98
+ file!(), line!(), stringify!($val), &tmp);
99
+ tmp
100
+ }
101
102
103
+}
104
105
+pub use dbg;
0 commit comments