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

Consolidate docs for built-in syntax extensions #22621

Closed
kmcallister opened this issue Feb 21, 2015 · 6 comments · Fixed by #24516
Closed

Consolidate docs for built-in syntax extensions #22621

kmcallister opened this issue Feb 21, 2015 · 6 comments · Fixed by #24516
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@kmcallister
Copy link
Contributor

concat_idents! is useless (#13294) so skip it.

@kmcallister kmcallister added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-book labels Feb 21, 2015
@jxcl
Copy link
Contributor

jxcl commented Feb 21, 2015

Neither of the macro chapters have sections for "common macros". Should we add one? Presumably there would be quite a few of them.

@kmcallister
Copy link
Contributor Author

There is rustdoc for the macros in std, plus some of the built-in syntax extensions. It's not that easy to find; there used to be a std::macros module in the rustdoc output but no longer :(

I'm not sure exactly what should be documented where. The built-in syntax extensions like conact! might deserve special mention, as they give you capabilities within macro_rules! that you otherwise would not have.

cc @steveklabnik

@jxcl
Copy link
Contributor

jxcl commented Feb 21, 2015

I think panic!, unreachable!, unimplemented! and vec! also deserve mentions.

@munds
Copy link
Contributor

munds commented Feb 23, 2015

I would like to take on the task of documenting all the common macros. I've started them and appreciate some input on how big the final list should be, and if every macro needs an example (or three). What about the most common one, prinln! ? Should that be in there too?

https://github.com/mund/rust/commit/a62e5e6f5081e52969bfe8a970f2b5a89bea6250

@kmcallister kmcallister changed the title Document stringify! and concat! in the macro chapter Consolidate docs for built-in syntax extensions Mar 8, 2015
@steveklabnik
Copy link
Member

It's not clear to me what doing this issue actually means. Moving some docs between some places?

@jxcl
Copy link
Contributor

jxcl commented Apr 1, 2015

The original issue was to add several common macro definitions with examples in TRPL, which I agreed with. I'm not sure what's up with the edits.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 17, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants