diff options
| author | Barosl Lee <vcs@barosl.com> | 2015-08-04 02:01:15 +0900 |
|---|---|---|
| committer | Barosl Lee <vcs@barosl.com> | 2016-01-19 06:24:08 +0900 |
| commit | 1a8cdc0f2f6a9f513cefbed36e5f57c1c45b8039 (patch) | |
| tree | d0faba669b8dbd46db99af6d15c19db4ef157f28 /src/libstd/macros.rs | |
| parent | 08886499cf0f7fea5de2cc555ea7bfe9ceb0b40f (diff) | |
| download | rust-1a8cdc0f2f6a9f513cefbed36e5f57c1c45b8039.tar.gz rust-1a8cdc0f2f6a9f513cefbed36e5f57c1c45b8039.zip | |
Use different numbers of `#`s when expanding documentation comments
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/macros.rs')
| -rw-r--r-- | src/libstd/macros.rs | 3 |
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 /// /// ``` |
