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

std: Document builtin syntax extensions #13255

Merged
merged 1 commit into from
Apr 4, 2014

Conversation

alexcrichton
Copy link
Member

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

/// 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)]
Copy link
Contributor

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?

Copy link
Member Author

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.

@alexcrichton
Copy link
Member Author

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.
Copy link
Member

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."

Copy link
Member

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?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huonw
Copy link
Member

huonw commented Apr 3, 2014

(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
bors added a commit that referenced this pull request Apr 4, 2014
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
@bors bors closed this Apr 4, 2014
@bors bors merged commit 78937b9 into rust-lang:master Apr 4, 2014
@alexcrichton alexcrichton deleted the issue-5605 branch April 4, 2014 18:50
@emberian
Copy link
Member

emberian commented Apr 5, 2014

I find your obsession with "dox" unhealthy.

Jarcho pushed a commit to Jarcho/rust that referenced this pull request Aug 24, 2024
Remove more `snippet_opt` calls

First commit is the same as rust-lang#13244

changelog: none
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.

Document built-in syntax extensions
6 participants