Tweak macros module

This commit is contained in:
Alex Crichton 2015-09-11 12:54:56 -07:00
parent 31504843db
commit 7ff0fdb49c
1 changed files with 3 additions and 5 deletions

View File

@ -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)*