about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristopher Durham <cad97@cad97.com>2025-03-26 13:52:22 -0400
committerChristopher Durham <cad97@cad97.com>2025-03-26 13:52:22 -0400
commit2c70c8a6e0b220377536e4e13172bfdfcd95c50f (patch)
treefd5cf94bba05dd0596684c29fed9dca38c8c3e7e
parent19cab6b878ab18dce4816d85ac52b317214c485f (diff)
downloadrust-2c70c8a6e0b220377536e4e13172bfdfcd95c50f.tar.gz
rust-2c70c8a6e0b220377536e4e13172bfdfcd95c50f.zip
mark cfg_match! semitransparent
-rw-r--r--library/core/src/macros/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index 5f200b31d1a..5571d8ad594 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -237,9 +237,10 @@ pub macro assert_matches {
 /// ```
 #[unstable(feature = "cfg_match", issue = "115585")]
 #[rustc_diagnostic_item = "cfg_match"]
+#[rustc_macro_transparency = "semitransparent"]
 pub macro cfg_match {
     ({ $($tt:tt)* }) => {{
-        cfg_match! { $($tt)* }
+        $crate::cfg_match! { $($tt)* }
     }},
     (_ => { $($output:tt)* }) => {
         $($output)*
@@ -249,10 +250,10 @@ pub macro cfg_match {
         $($( $rest:tt )+)?
     ) => {
         #[cfg($cfg)]
-        cfg_match! { _ => $output }
+        $crate::cfg_match! { _ => $output }
         $(
             #[cfg(not($cfg))]
-            cfg_match! { $($rest)+ }
+            $crate::cfg_match! { $($rest)+ }
         )?
     },
 }