Skip to content

Commit 31b8a15

Browse files
committed
Update libcore macro stubs like libstd
1 parent 6ff04ff commit 31b8a15

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/libcore/macros.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,10 @@ mod builtin {
612612
#[stable(feature = "rust1", since = "1.0.0")]
613613
#[macro_export]
614614
#[cfg(dox)]
615-
macro_rules! format_args { ($fmt:expr, $($args:tt)*) => ({
616-
/* compiler built-in */
617-
}) }
615+
macro_rules! format_args {
616+
($fmt:expr) => ({ /* compiler built-in */ });
617+
($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ });
618+
}
618619

619620
/// Inspect an environment variable at compile time.
620621
///
@@ -624,7 +625,10 @@ mod builtin {
624625
#[stable(feature = "rust1", since = "1.0.0")]
625626
#[macro_export]
626627
#[cfg(dox)]
627-
macro_rules! env { ($name:expr) => ({ /* compiler built-in */ }) }
628+
macro_rules! env {
629+
($name:expr) => ({ /* compiler built-in */ });
630+
($name:expr,) => ({ /* compiler built-in */ });
631+
}
628632

629633
/// Optionally inspect an environment variable at compile time.
630634
///
@@ -645,7 +649,8 @@ mod builtin {
645649
#[macro_export]
646650
#[cfg(dox)]
647651
macro_rules! concat_idents {
648-
($($e:ident),*) => ({ /* compiler built-in */ })
652+
($($e:ident),*) => ({ /* compiler built-in */ });
653+
($($e:ident,)*) => ({ /* compiler built-in */ });
649654
}
650655

651656
/// Concatenates literals into a static string slice.
@@ -656,7 +661,10 @@ mod builtin {
656661
#[stable(feature = "rust1", since = "1.0.0")]
657662
#[macro_export]
658663
#[cfg(dox)]
659-
macro_rules! concat { ($($e:expr),*) => ({ /* compiler built-in */ }) }
664+
macro_rules! concat {
665+
($($e:expr),*) => ({ /* compiler built-in */ });
666+
($($e:expr,)*) => ({ /* compiler built-in */ });
667+
}
660668

661669
/// A macro which expands to the line number on which it was invoked.
662670
///

0 commit comments

Comments
 (0)