Skip to content

Conversation

steveklabnik
Copy link
Contributor

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
Contributor

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
Contributor Author

Should I just put that for now, then?

@huonw
Copy link
Contributor

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
Contributor Author

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

@steveklabnik
Copy link
Contributor 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
Contributor

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
Contributor 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
Contributor

huonw commented Jan 22, 2015

(r=me)

@steveklabnik
Copy link
Contributor 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