mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
mark cfg_match! semitransparent
This commit is contained in:
parent
19cab6b878
commit
2c70c8a6e0
@ -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)+ }
|
||||
)?
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user