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

Allow attributes on macros #9753

Merged
merged 1 commit into from
Oct 9, 2013
Merged

Conversation

alexcrichton
Copy link
Member

It's unclear to me why these currently aren't allowed, and my best guess is that
a long time ago we didn't strip the ast of cfg nodes before syntax expansion.
Now that this is done, I'm not certain that we should continue to prohibit this
functionality.

This is a step in the right direction towards #5605, because now we can add an
empty std::macros module to the documentation with a bunch of empty macros
explaining how they're supposed to be used.

@sanxiyn
Copy link
Member

sanxiyn commented Oct 8, 2013

For archaeologists, stripping before expansion was done in #7297.

@huonw
Copy link
Member

huonw commented Oct 8, 2013

now we can add an empty std::macros module to the documentation with a bunch of empty macros explaining how they're supposed to be used.

Note that this requires modifying syntax::ext::expand::expand_item_mac so that macro_rules!s aren't dropped from the AST during expansion.

It's unclear to me why these currently aren't allowed, and my best guess is that
a long time ago we didn't strip the ast of cfg nodes before syntax expansion.
Now that this is done, I'm not certain that we should continue to prohibit this
functionality.

This is a step in the right direction towards rust-lang#5605, because now we can add an
empty `std::macros` module to the documentation with a bunch of empty macros
explaining how they're supposed to be used.
bors added a commit that referenced this pull request Oct 9, 2013
It's unclear to me why these currently aren't allowed, and my best guess is that
a long time ago we didn't strip the ast of cfg nodes before syntax expansion.
Now that this is done, I'm not certain that we should continue to prohibit this
functionality.

This is a step in the right direction towards #5605, because now we can add an
empty `std::macros` module to the documentation with a bunch of empty macros
explaining how they're supposed to be used.
@bors bors closed this Oct 9, 2013
@bors bors merged commit 252d17a into rust-lang:master Oct 9, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 21, 2022
Update CONTRIBUTING.md with changelog guidance

`@xFrednet` I cribbed some text of yours from rust-lang/rust-clippy#9743 (comment) and did some light editing in the hope that others might find it.

r? `@xFrednet`

changelog: Update CONTRIBUTING.md with changelog guidance
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