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

Document all attributes and macros with examples #6444

Closed
48 of 56 tasks
kud1ing opened this issue May 13, 2013 · 15 comments · Fixed by #21091
Closed
48 of 56 tasks

Document all attributes and macros with examples #6444

kud1ing opened this issue May 13, 2013 · 15 comments · Fixed by #21091
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority

Comments

@kud1ing
Copy link

kud1ing commented May 13, 2013

rust.md#attributes and rust.md#macros document some attributes and macros, but give few examples. Also there are some attributes/macros missing.

Attributes:

Macros:

@alexcrichton
Copy link
Member

Nominating for the well-covered milestone.

@graydon
Copy link
Contributor

graydon commented May 16, 2013

accepted for well-covered milestone

@pnkfelix
Copy link
Member

(the list here is too long to cope with sensibly so I am trying to make reasonably categorized sub-bugs.)

@pnkfelix
Copy link
Member

abi has an example in rust.md; I'm going to cross it out above (with a note for why it has been struck out).

@pnkfelix
Copy link
Member

Funny, the license attribute appears in rust.md, but not in any of our code nor is it handled in any way by the compiler. Such meta-data is propagated into the generated crate, but the current manual also says that all attribute names are effectively reserved (because only rustc interprets attributes).

Perhaps we should handle this by explicitly listing the attributes that do not and will not have a default interpretation via rustc (where license would be one of several attributes on that list)?

@pnkfelix
Copy link
Member

Okay there are only a handful of remaining small attributes that have not been delegated to some sub-bug. They can probably be handled just by associating them with this bug directly, unless someone feels like creating a new "miscellaneous" sub-bug, or new sub-bugs for each of them.

@pnkfelix
Copy link
Member

(and of course I haven't done anything with the list of macros yet).

@klutzy
Copy link
Contributor

klutzy commented Nov 5, 2013

I've collected most attributes currently in use at wiki.

@pnkfelix
Copy link
Member

Documentation is low-hanging fruit, but not a reason to block 1.0.

Not 1.0; P-low.

@xmo-odoo
Copy link

Is it normal that the macros doc seem to have disappeared from the official documentation?

E.g. searching for bytes! returns no match (without the bang it returns plenty of function called bytes, none of which seems to fit), and adapting the old path to http://doc.rust-lang.org/std/macros/builtin/macro.bytes.html is a 404

@huonw
Copy link
Member

huonw commented Jul 16, 2014

@xmo-odoo it's just a bug: #15645

@Gankra
Copy link
Contributor

Gankra commented Oct 14, 2014

This is all messed up now that we have the Guide and no Tutorial.

@mdinger
Copy link
Contributor

mdinger commented Oct 27, 2014

#16644 is related

@John-Nagle
Copy link

On May 12, 2013, kud1ing passed buck on "license" attribute to Bug 7961.
On Oct 24, 2013, catamorphism passed buck on Bug 7961 back to this bug.

At least two library crates won't build due to "license" attributes now being an error. (Was 3, but "stainless" was fixed. Currently broken: "http" and one other crate.)

@steveklabnik
Copy link
Member

Checking off no_implicit_prelude, doc, no_mangle, no_std, start, static_assert, and unsafe_destructor attributes, because they have docs.

checking off license and nolink attributes because they're gone.

checking off log_syntax and macro_rules macros because they have docs

checking off proto macro because it's gone.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Jan 22, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Jan 22, 2015
…huonw

Fixes rust-lang#6444

I need some help with the macro docs here, as I couldn't figure it out. @kmcallister @eddyb  or someone else?
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.