diff options
| author | bors <bors@rust-lang.org> | 2017-12-03 23:02:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-03 23:02:40 +0000 |
| commit | fdfbcf85d55da97ed1a00823510b876018047aaf (patch) | |
| tree | 01d830b5a1019b1db9936cb9084bdfb64164ea4f /src/libstd | |
| parent | 1956d5535ad77ddf46e4b29ba089a8b4a73cfaea (diff) | |
| parent | 48d38555e533649c5cc1634d64a1851d265da979 (diff) | |
| download | rust-fdfbcf85d55da97ed1a00823510b876018047aaf.tar.gz rust-fdfbcf85d55da97ed1a00823510b876018047aaf.zip | |
Auto merge of #46482 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests - Successful merges: #45957, #46260, #46432, #46442, #46454, #46462, #46465, #46473 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 9d0373404aa..7d62f94056f 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -325,9 +325,10 @@ pub mod builtin { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! format_args { ($fmt:expr, $($args:tt)*) => ({ - /* compiler built-in */ - }) } + macro_rules! format_args { + ($fmt:expr) => ({ /* compiler built-in */ }); + ($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ }); + } /// Inspect an environment variable at compile time. /// @@ -348,7 +349,10 @@ pub mod builtin { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! env { ($name:expr) => ({ /* compiler built-in */ }) } + macro_rules! env { + ($name:expr) => ({ /* compiler built-in */ }); + ($name:expr,) => ({ /* compiler built-in */ }); + } /// Optionally inspect an environment variable at compile time. /// @@ -400,7 +404,8 @@ pub mod builtin { #[unstable(feature = "concat_idents_macro", issue = "29599")] #[macro_export] macro_rules! concat_idents { - ($($e:ident),*) => ({ /* compiler built-in */ }) + ($($e:ident),*) => ({ /* compiler built-in */ }); + ($($e:ident,)*) => ({ /* compiler built-in */ }); } /// Concatenates literals into a static string slice. @@ -420,7 +425,10 @@ pub mod builtin { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! concat { ($($e:expr),*) => ({ /* compiler built-in */ }) } + macro_rules! concat { + ($($e:expr),*) => ({ /* compiler built-in */ }); + ($($e:expr,)*) => ({ /* compiler built-in */ }); + } /// A macro which expands to the line number on which it was invoked. /// |
