-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
std: Document builtin syntax extensions #13255
Conversation
/// These macros do not have any corresponding definition with a `macro_rules!` | ||
/// macro, but are documented here. Their implementations can be found hardcoded | ||
/// into libsyntax itself. | ||
#[cfg(dox)] |
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.
why not use docs
or doc
?
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.
I like the name dox
, and it's essentially invisible to anyone but those working on libstd.
Updated with comments addressed |
/// This macro takes any number of comma-separated identifiers, and | ||
/// concatenates them all into one, yielding an expression which is a new | ||
/// identifier. Note that hygiene makes it such that this macro cannot | ||
/// capture local variables. |
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.
" and macros are only allowed in item, statement or expression position, meaning this macro can rarely be used."
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.
(Maybe we should feature-gate concat_idents
?)
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.
(Oh, forgot to say: r=me with comments.) |
These syntax extensions need a place to be documented, and this starts passing a `--cfg dox` parameter to `rustdoc` when building and testing documentation in order to document macros so that they have no effect on the compiled crate, but only documentation. Closes rust-lang#5605
These syntax extensions need a place to be documented, and this starts passing a `--cfg dox` parameter to `rustdoc` when building and testing documentation in order to document macros so that they have no effect on the compiled crate, but only documentation. Closes #5605
I find your obsession with "dox" unhealthy. |
Remove more `snippet_opt` calls First commit is the same as rust-lang#13244 changelog: none
These syntax extensions need a place to be documented, and this starts passing a
--cfg dox
parameter torustdoc
when building and testing documentation inorder to document macros so that they have no effect on the compiled crate, but
only documentation.
Closes #5605