about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-10-22 23:02:15 +0000
committerbors <bors@rust-lang.org>2017-10-22 23:02:15 +0000
commit4c053db233d69519b548e5b8ed7192d0783e582a (patch)
tree78ed5629b384d84f5a3157c4d7a23ee5055db29c
parent8493813cd8143940264f17d7bcb026c968d43b03 (diff)
parent365eafbc7f78dc8bac70d7f07950c44b0b62abd7 (diff)
downloadrust-4c053db233d69519b548e5b8ed7192d0783e582a.tar.gz
rust-4c053db233d69519b548e5b8ed7192d0783e582a.zip
Auto merge of #45451 - durka:patch-45, r=steveklabnik
fix stringify docs

Update `stringify!` docs to show actual accepted syntax. Reported [on reddit](https://www.reddit.com/r/rust/comments/76o8rh/hey_rustaceans_got_an_easy_question_ask_here/dopzwys/).
-rw-r--r--src/libcore/macros.rs4
-rw-r--r--src/libstd/macros.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index d64c984ea7d..12667036444 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -682,7 +682,7 @@ mod builtin {
     #[cfg(dox)]
     macro_rules! file { () => ({ /* compiler built-in */ }) }
 
-    /// A macro which stringifies its argument.
+    /// A macro which stringifies its arguments.
     ///
     /// For more information, see the documentation for [`std::stringify!`].
     ///
@@ -690,7 +690,7 @@ mod builtin {
     #[stable(feature = "rust1", since = "1.0.0")]
     #[macro_export]
     #[cfg(dox)]
-    macro_rules! stringify { ($t:tt) => ({ /* compiler built-in */ }) }
+    macro_rules! stringify { ($($t:tt)*) => ({ /* compiler built-in */ }) }
 
     /// Includes a utf8-encoded file as a string.
     ///
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 8089671f309..6318e2e4087 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -490,7 +490,7 @@ pub mod builtin {
     #[macro_export]
     macro_rules! file { () => ({ /* compiler built-in */ }) }
 
-    /// A macro which stringifies its argument.
+    /// A macro which stringifies its arguments.
     ///
     /// This macro will yield an expression of type `&'static str` which is the
     /// stringification of all the tokens passed to the macro. No restrictions
@@ -507,7 +507,7 @@ pub mod builtin {
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[macro_export]
-    macro_rules! stringify { ($t:tt) => ({ /* compiler built-in */ }) }
+    macro_rules! stringify { ($($t:tt)*) => ({ /* compiler built-in */ }) }
 
     /// Includes a utf8-encoded file as a string.
     ///