summaryrefslogtreecommitdiffstats
path: root/vendor/regex-automata/src/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/regex-automata/src/macros.rs')
-rw-r--r--vendor/regex-automata/src/macros.rs24
1 files changed, 7 insertions, 17 deletions
diff --git a/vendor/regex-automata/src/macros.rs b/vendor/regex-automata/src/macros.rs
index 649ba17c5..31b4ca381 100644
--- a/vendor/regex-automata/src/macros.rs
+++ b/vendor/regex-automata/src/macros.rs
@@ -1,20 +1,6 @@
-/// A simple macro for defining bitfield accessors/mutators.
-#[cfg(feature = "alloc")]
-macro_rules! define_bool {
- ($bit:expr, $is_fn_name:ident, $set_fn_name:ident) => {
- fn $is_fn_name(&self) -> bool {
- self.bools & (0b1 << $bit) > 0
- }
-
- fn $set_fn_name(&mut self, yes: bool) {
- if yes {
- self.bools |= 1 << $bit;
- } else {
- self.bools &= !(1 << $bit);
- }
- }
- };
-}
+// Some feature combinations result in some of these macros never being used.
+// Which is fine. Just squash the warnings.
+#![allow(unused_macros)]
macro_rules! log {
($($tt:tt)*) => {
@@ -25,6 +11,10 @@ macro_rules! log {
}
}
+macro_rules! debug {
+ ($($tt:tt)*) => { log!(log::debug!($($tt)*)) }
+}
+
macro_rules! trace {
($($tt:tt)*) => { log!(log::trace!($($tt)*)) }
}