Skip to content

Commit

Permalink
Auto merge of #45451 - durka:patch-45, r=steveklabnik
Browse files Browse the repository at this point in the history
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/).
  • Loading branch information
bors committed Oct 22, 2017
2 parents 8493813 + 365eafb commit 4c053db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,15 +682,15 @@ 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!`].
///
/// [`std::stringify!`]: ../std/macro.stringify.html
#[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.
///
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
///
Expand Down

0 comments on commit 4c053db

Please sign in to comment.