Skip to content

Fix doc comment parsing in macros. #27056

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

Merged
merged 1 commit into from Jul 20, 2015
Merged

Fix doc comment parsing in macros. #27056

merged 1 commit into from Jul 20, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jul 15, 2015

Fixes #23812 by stripping the decoration when desugaring macro doc comments into #[doc] attributes, and detects whether the attribute should be inner or outer style and outputs the appropriate token tree.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

@nikomatsakis
Copy link
Contributor

This looks nice, but it'd be great to modify the rustdoc tests to test this case too (afaict, the tests in question don't actually test what the rustdoc output looks like, right?)

@nikomatsakis
Copy link
Contributor

The existing tests are in src/test/rustdoc I think. Sadly there is no README, so if you can't make heads or tails of it, just ping me (or @alexcrichton).

@ghost
Copy link
Author

ghost commented Jul 17, 2015

Yeah these tests are just for checking that inner/outer are expanded into the correct token trees, will try and decipher the rustdoc test syntax now.

@ghost
Copy link
Author

ghost commented Jul 17, 2015

Ok added a rustdoc test, hopefully all is well as testing mostly involved inverting the logic and inserting deliberate typos (python errors are not as useful as rust errors!).

@bors
Copy link
Collaborator

bors commented Jul 18, 2015

☔ The latest upstream changes (presumably #27098) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

@bors r+ nice!

@bors
Copy link
Collaborator

bors commented Jul 20, 2015

📌 Commit a219917 has been approved by nikomatsakis

@bors
Copy link
Collaborator

bors commented Jul 20, 2015

⌛ Testing commit a219917 with merge ed49bad...

bors added a commit that referenced this pull request Jul 20, 2015
Fixes #23812 by stripping the decoration when desugaring macro doc comments into #[doc] attributes, and detects whether the attribute should be inner or outer style and outputs the appropriate token tree.
@bors bors merged commit a219917 into rust-lang:master Jul 20, 2015
durka added a commit to durka/lazy-static.rs that referenced this pull request Jul 21, 2015
@ghost ghost deleted the doc-comments branch July 21, 2015 18:49
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.

3 participants