-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
The plugins guide says a little about the |
Should I just put that for now, then? |
I have a feeling there's been additions to our set of macros & attributes since #6444, but I am unsure. |
That's possible. Where's the definitive list? |
52cf714
to
d69ac86
Compare
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. |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems good
(r=me) |
d69ac86
to
4a6af11
Compare
…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?
Fixes #6444
I need some help with the macro docs here, as I couldn't figure it out. @kmcallister @eddyb or someone else?