about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-02-03 02:54:24 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-02-03 02:54:24 +0530
commit76e00250788e81a639508fd98b04a0932af0bb2c (patch)
treefd79e388f022e3414e21366442963054691c51cf /src/libstd
parent59b7c907a3e3dd8b263297adf6ff0515fac125e3 (diff)
parent1a8cdc0f2f6a9f513cefbed36e5f57c1c45b8039 (diff)
downloadrust-76e00250788e81a639508fd98b04a0932af0bb2c.tar.gz
rust-76e00250788e81a639508fd98b04a0932af0bb2c.zip
Rollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis
Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s.

This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.

Fixes #27489.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 0917346213f..b7afd12d8e5 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -365,6 +365,9 @@ pub mod builtin {
     /// stringification of all the tokens passed to the macro. No restrictions
     /// are placed on the syntax of the macro invocation itself.
     ///
+    /// Note that the expanded results of the input tokens may change in the
+    /// future. You should be careful if you rely on the output.
+    ///
     /// # Examples
     ///
     /// ```