-
Couldn't load subscription status.
- Fork 557
Update macro_export to use the attribute template
#1885
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This renames the section title to "The `macro_export` attribute" to follow the attribute template. Although I like the old title, since it describes what it does, I would prefer to not make exceptions and stay consistent.
Rewording to follow the template, and to try to be a little clearer.
This adds more rules to be a little more explicit about the behavior, along with some examples.
This moves it to the macro_export section (since it is part of that macro). There are slight wording differences. One new addition is to clarify that it only works for single-segment paths.
In addition to some editorial clean-ups, let's add an example demonstrating the difference between textual-only scope and path-based resolution, and let's move some verbiage about intended use into an admonition.
946fc3b to
e7f0a9c
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
traviscross
approved these changes
Oct 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New rules:
macro.decl.scope.macro_export.syntaxmacro.decl.scope.macro_export.allowed-positionsmacro.decl.scope.macro_export.duplicatesmacro.decl.scope.macro_export.path-basedmacro.decl.scope.macro_export.macro_useRenamed rules:
macro.decl.scope.pathis nowmacro.decl.scope.macro_exportmacro.decl.scope.path.introis nowmacro.decl.scope.macro_export.intromacro.decl.scope.path.exportis nowmacro.decl.scope.macro_export.exportmacro.decl.hygiene.local_inner_macrosis nowmacro.decl.scope.macro_export.local_inner_macros