summaryrefslogtreecommitdiffstats
path: root/vendor/snapbox-macros/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/snapbox-macros/src
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/snapbox-macros/src')
-rw-r--r--vendor/snapbox-macros/src/lib.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/vendor/snapbox-macros/src/lib.rs b/vendor/snapbox-macros/src/lib.rs
index 8cc828e1b..a9e0461f8 100644
--- a/vendor/snapbox-macros/src/lib.rs
+++ b/vendor/snapbox-macros/src/lib.rs
@@ -1,10 +1,19 @@
+#[cfg(feature = "color")]
+pub use anstream::eprint;
+#[cfg(feature = "color")]
+pub use anstream::eprintln;
+#[cfg(not(feature = "color"))]
+pub use std::eprint;
+#[cfg(not(feature = "color"))]
+pub use std::eprintln;
+
/// Feature-flag controlled additional test debug information
#[cfg(feature = "debug")]
#[macro_export]
macro_rules! debug {
($($arg:tt)*) => ({
- eprint!("[{:>w$}] \t", module_path!(), w = 28);
- eprintln!($($arg)*);
+ $crate::eprint!("[{:>w$}] \t", module_path!(), w = 28);
+ $crate::eprintln!($($arg)*);
})
}