Tweak macros module
This commit is contained in:
parent
31504843db
commit
7ff0fdb49c
|
@ -1,8 +1,8 @@
|
|||
//! A macro for defining #[cfg] if-else statements.
|
||||
//!
|
||||
//! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
|
||||
//! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
|
||||
//! emitting the implementation which matches first.
|
||||
//! This is similar to the `if/elif` C preprocessor macro by allowing definition
|
||||
//! of a cascade of `#[cfg]` cases, emitting the implementation which matches
|
||||
//! first.
|
||||
//!
|
||||
//! This allows you to conveniently provide a long list #[cfg]'d blocks of code
|
||||
//! without having to rewrite each clause multiple times.
|
||||
|
@ -21,7 +21,6 @@ macro_rules! cfg_if {
|
|||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
macro_rules! __cfg_if_items {
|
||||
(($($not:meta,)*) ; ) => {};
|
||||
(($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
|
||||
|
@ -30,7 +29,6 @@ macro_rules! __cfg_if_items {
|
|||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
macro_rules! __cfg_if_apply {
|
||||
($m:meta, $($it:item)*) => {
|
||||
$(#[$m] $it)*
|
||||
|
|
Loading…
Reference in New Issue