mirror of
https://gitee.com/openharmony/third_party_rust_cfg-if
synced 2024-11-27 01:03:13 +00:00
remove the __apply internal macro
This commit is contained in:
parent
75e817fa2c
commit
571a28d359
@ -71,7 +71,7 @@ macro_rules! cfg_if {
|
||||
// Emit all items within one block, applying an appropriate #[cfg]. The
|
||||
// #[cfg] will require all `$m` matchers specified and must also negate
|
||||
// all previous matchers.
|
||||
$crate::cfg_if! { @__apply cfg(all($($m,)* not(any($($not),*)))), $($tokens)* }
|
||||
#[cfg(all($($m,)* not(any($($not),*))))] $crate::cfg_if! { @__identity $($tokens)* }
|
||||
|
||||
// Recurse to emit all other items in `$rest`, and when we do so add all
|
||||
// our `$m` matchers to the list of `$not` matchers as future emissions
|
||||
@ -79,11 +79,6 @@ macro_rules! cfg_if {
|
||||
$crate::cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
|
||||
};
|
||||
|
||||
// Internal macro to Apply a cfg attribute to a list of items
|
||||
(@__apply $m:meta, $($tokens:tt)*) => {
|
||||
#[$m] $crate::cfg_if! { @__identity $($tokens)* }
|
||||
};
|
||||
|
||||
// Internal macro to make __apply work out right for different match types,
|
||||
// because of how macros matching/expand stuff.
|
||||
(@__identity $($tokens:tt)*) => {
|
||||
|
Loading…
Reference in New Issue
Block a user