Skip to content

Commit c0aabcf

Browse files
committed
Remove cfg_if macro from libstd
1 parent 97f2005 commit c0aabcf

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

src/libstd/macros.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -943,39 +943,3 @@ mod builtin {
943943
($cond:expr, $($arg:tt)+) => ({ /* compiler built-in */ });
944944
}
945945
}
946-
947-
/// A macro for defining `#[cfg]` if-else statements.
948-
///
949-
/// This is similar to the `if/elif` C preprocessor macro by allowing definition
950-
/// of a cascade of `#[cfg]` cases, emitting the implementation which matches
951-
/// first.
952-
///
953-
/// This allows you to conveniently provide a long list `#[cfg]`'d blocks of code
954-
/// without having to rewrite each clause multiple times.
955-
macro_rules! cfg_if {
956-
($(
957-
if #[cfg($($meta:meta),*)] { $($it:item)* }
958-
) else * else {
959-
$($it2:item)*
960-
}) => {
961-
__cfg_if_items! {
962-
() ;
963-
$( ( ($($meta),*) ($($it)*) ), )*
964-
( () ($($it2)*) ),
965-
}
966-
}
967-
}
968-
969-
macro_rules! __cfg_if_items {
970-
(($($not:meta,)*) ; ) => {};
971-
(($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
972-
__cfg_if_apply! { cfg(all(not(any($($not),*)), $($m,)*)), $($it)* }
973-
__cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* }
974-
}
975-
}
976-
977-
macro_rules! __cfg_if_apply {
978-
($m:meta, $($it:item)*) => {
979-
$(#[$m] $it)*
980-
}
981-
}

0 commit comments

Comments
 (0)