Skip to content

Commit c76ce8c

Browse files
committed
Rollup merge of rust-lang#21091 - steveklabnik:add_attribute_docs, r=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?
2 parents d1c7ae4 + 4a6af11 commit c76ce8c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: src/doc/reference.md

+12
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,15 @@ Rust syntax is restricted in two ways:
739739
* `concat!` : concatenates a comma-separated list of literals
740740
* `concat_idents!` : create a new identifier by concatenating the arguments
741741

742+
The following attributes are used for quasiquoting in procedural macros:
743+
744+
* `quote_expr!`
745+
* `quote_item!`
746+
* `quote_pat!`
747+
* `quote_stmt!`
748+
* `quote_tokens!`
749+
* `quote_ty!`
750+
742751
# Crates and source files
743752

744753
Rust is a *compiled* language. Its semantics obey a *phase distinction*
@@ -2028,6 +2037,9 @@ type int8_t = i8;
20282037
item](#language-items) for more details.
20292038
- `test` - indicates that this function is a test function, to only be compiled
20302039
in case of `--test`.
2040+
- `should_fail` - indicates that this test function should panic, inverting the success condition.
2041+
- `cold` - The function is unlikely to be executed, so optimize it (and calls
2042+
to it) differently.
20312043

20322044
### Static-only attributes
20332045

0 commit comments

Comments
 (0)