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

Pass doc comments to proc macro not as a Literal #48189

Closed
dtolnay opened this issue Feb 13, 2018 · 1 comment
Closed

Pass doc comments to proc macro not as a Literal #48189

dtolnay opened this issue Feb 13, 2018 · 1 comment
Labels
A-macros-2.0 Area: Declarative macros 2.0 (#39412) C-feature-request Category: A feature request, i.e: not implemented / a PR.

Comments

@dtolnay
Copy link
Member

dtolnay commented Feb 13, 2018

Doc comments should be parsed as a sequence of tokens # [ doc = ... ] rather than as a TokenNode::Literal. I believe this approach has worked well for macros-by-example. Nobody considers doc comments to be a type of "literal" and it can be surprising when they pop up this way.

@dtolnay dtolnay added the A-macros-2.0 Area: Declarative macros 2.0 (#39412) label Feb 13, 2018
@TimNN TimNN added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Feb 13, 2018
@dtolnay
Copy link
Member Author

dtolnay commented Apr 29, 2018

Fixed in #49545.

@dtolnay dtolnay closed this as completed Apr 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros-2.0 Area: Declarative macros 2.0 (#39412) C-feature-request Category: A feature request, i.e: not implemented / a PR.
Projects
None yet
Development

No branches or pull requests

2 participants