about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_data_structures/src/lib.rs')
-rw-r--r--compiler/rustc_data_structures/src/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs
index 3ef87684fa5..93b4032c310 100644
--- a/compiler/rustc_data_structures/src/lib.rs
+++ b/compiler/rustc_data_structures/src/lib.rs
@@ -150,3 +150,14 @@ pub fn make_display(f: impl Fn(&mut fmt::Formatter<'_>) -> fmt::Result) -> impl
 // See comments in src/librustc_middle/lib.rs
 #[doc(hidden)]
 pub fn __noop_fix_for_27438() {}
+
+#[macro_export]
+macro_rules! external_bitflags_debug {
+    ($Name:ident) => {
+        impl ::std::fmt::Debug for $Name {
+            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+                ::bitflags::parser::to_writer(self, f)
+            }
+        }
+    };
+}