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 remaining attributes and macros #21091

Merged
merged 1 commit into from
Jan 23, 2015

Conversation

steveklabnik
Copy link
Member

Fixes #6444

I need some help with the macro docs here, as I couldn't figure it out. @kmcallister @eddyb or someone else?

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@kmcallister
Copy link
Contributor

The plugins guide says a little about the quote_* macros. They are quasiquotes for use in writing procedural macros, and they are extremely janky.

@steveklabnik
Copy link
Member Author

Should I just put that for now, then?

@huonw
Copy link
Member

huonw commented Jan 13, 2015

I have a feeling there's been additions to our set of macros & attributes since #6444, but I am unsure.

@steveklabnik
Copy link
Member Author

That's possible. Where's the definitive list?

@steveklabnik
Copy link
Member Author

I think this is good enough to ship now. If there is anything else I missed, it'll get caught in the reference work.

@@ -2041,6 +2050,8 @@ type int8_t = i8;
item](#language-items) for more details.
- `test` - indicates that this function is a test function, to only be compiled
in case of `--test`.
- `should_fail` - indicates that this test function should panic, inverting the success condition.
- `cold` - The function is unlikely to be executed, so optimize it differently.
Copy link
Member

Choose a reason for hiding this comment

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

"so optimize it and calls to it", maybe? (IME, the main use is making the compiler rearrange branches to preference the ones that don't have #[cold] functions.)

Copy link
Member Author

Choose a reason for hiding this comment

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

seems good

@huonw
Copy link
Member

huonw commented Jan 22, 2015

(r=me)

@steveklabnik
Copy link
Member Author

@bors: r=huonw 4a6af11 rollup

steveklabnik added a commit to steveklabnik/rust that referenced this pull request 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?
bors added a commit that referenced this pull request Jan 23, 2015
@bors bors merged commit 4a6af11 into rust-lang:master Jan 23, 2015
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 all attributes and macros with examples
6 participants