-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[wip] reference: rework Macros section #31990
Conversation
r? @Manishearth (rust_highfive has picked a reviewer for you, use r? to override) |
types[^typemacros]. This distinction is inferred from the context in which the | ||
macro is invoked, and carefully written macros may work in multiple contexts. | ||
|
||
[^typemacros]: Gated by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do footnotes work in rustdoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same syntax is used elsewhere in the reference.
98c0144
to
cc1b792
Compare
Rearrange and add content to the Macros section to make it more informative and useful.
from the "procedural macros" defined in [compiler plugins][plugin]. | ||
`macro_rules` allows users to define syntax extensions in a declarative way. | ||
We call such extensions "`macro_rules!` macros" or simply "macros" — to be | ||
distinguished from the "procedural macros" defined in [compiler plugins][plugin]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term ‶macros by example″ has also been used at several places and might be worth mentionning.
Closing due to inactivity, but feel free to reopen with comments addressed! |
Rearrange and add content to the Macros section to make it more informative and useful.
Changelog:
sep_token
andnon_special_token
tt
#[macro_use]
,#[macro_export]
,#[macro_reexport]
,$crate
)