Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve escape sequences in documentation comments on macro expansion #26777

Merged
merged 1 commit into from
Jul 17, 2015

Conversation

barosl
Copy link
Contributor

@barosl barosl commented Jul 4, 2015

Escape sequences in documentation comments must not be parsed as a normal string when expanding a macro, otherwise some innocent but invalid-escape-sequence-looking comments will trigger an ICE.

Although this commit replaces normal string literals with raw string literals in macro expansion, this shouldn't be much a problem considering documentation comments are converted into attributes before being passed to a macro anyways.

Fixes #25929.
Fixes #25943.

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

Escape sequences in documentation comments must not be parsed as a
normal string when expanding a macro, otherwise some innocent but
invalid-escape-sequence-looking comments will trigger an ICE.

Although this commit replaces normal string literals with raw string
literals in macro expansion, this shouldn't be much a problem
considering documentation comments are converted into attributes before
being passed to a macro anyways.

Fixes rust-lang#25929.
Fixes rust-lang#25943.
@barosl barosl force-pushed the macro-doc-escapes branch from 2743c93 to 5c60d1d Compare July 9, 2015 16:31
@pnkfelix
Copy link
Member

@bors r+ 5c60d1d rollup

Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 17, 2015
Escape sequences in documentation comments must not be parsed as a normal string when expanding a macro, otherwise some innocent but invalid-escape-sequence-looking comments will trigger an ICE.

Although this commit replaces normal string literals with raw string literals in macro expansion, this shouldn't be much a problem considering documentation comments are converted into attributes before being passed to a macro anyways.

Fixes rust-lang#25929.
Fixes rust-lang#25943.
bors added a commit that referenced this pull request Jul 17, 2015
@bors bors merged commit 5c60d1d into rust-lang:master Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants