diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:49:15 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:49:15 -0800 |
| commit | 26cd8eae48ea99bda183c5224bc423991ccfaf1f (patch) | |
| tree | 26492380aa79b1b1f70acb2a624e30ca097374df /src/libcore/macros.rs | |
| parent | 34a63d336419e80d3afec16c730d1ad5fa11dc73 (diff) | |
| parent | e9cbdd866d1c9c01e9affaf6875e37e58a073758 (diff) | |
rollup merge of #20563: cmr/macro-input-future-proofing
Diffstat (limited to 'src/libcore/macros.rs')
| -rw-r--r-- | src/libcore/macros.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index d01621fc6d8..00bfe56a622 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -179,9 +179,12 @@ macro_rules! write { #[macro_export] #[stable] macro_rules! writeln { - ($dst:expr, $fmt:expr $($arg:tt)*) => ( - write!($dst, concat!($fmt, "\n") $($arg)*) - ) + ($dst:expr, $fmt:expr) => ( + write!($dst, concat!($fmt, "\n")) + ); + ($dst:expr, $fmt:expr, $($arg:expr),*) => ( + write!($dst, concat!($fmt, "\n"), $($arg,)*) + ); } /// A utility macro for indicating unreachable code. |
