Skip to content

Commit d953a36

Browse files
authored
Merge pull request #1641 from ehuss/sort-fragments
Sort macro fragment specifiers
2 parents cfaf525 + 91dc88b commit d953a36

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/macros-by-example.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -137,22 +137,21 @@ fragment of the kind specified and binds it to the metavariable `$`_name_.
137137
r[macro.decl.meta.specifier]
138138
Valid fragment specifiers are:
139139

140-
* `item`: an [_Item_]
141140
* `block`: a [_BlockExpression_]
142-
* `stmt`: a [_Statement_] without the trailing semicolon (except for item
143-
statements that require semicolons)
144-
* `pat_param`: a [_PatternNoTopAlt_]
145-
* `pat`: at least any [_PatternNoTopAlt_], and possibly more depending on edition
146141
* `expr`: an [_Expression_] except [_UnderscoreExpression_] and [_ConstBlockExpression_] (see [macro.decl.meta.expr-underscore])
147142
* `expr_2021`: same as `expr` (see [macro.decl.meta.edition2021])
148-
* `ty`: a [_Type_]
149143
* `ident`: an [IDENTIFIER_OR_KEYWORD] or [RAW_IDENTIFIER]
144+
* `item`: an [_Item_]
145+
* `lifetime`: a [LIFETIME_TOKEN]
146+
* `literal`: matches `-`<sup>?</sup>[_LiteralExpression_]
147+
* `meta`: an [_Attr_], the contents of an attribute
148+
* `pat`: at least any [_PatternNoTopAlt_], and possibly more depending on edition
149+
* `pat_param`: a [_PatternNoTopAlt_]
150150
* `path`: a [_TypePath_] style path
151+
* `stmt`: a [_Statement_] without the trailing semicolon (except for item statements that require semicolons)
151152
* `tt`: a [_TokenTree_]&nbsp;(a single [token] or tokens in matching delimiters `()`, `[]`, or `{}`)
152-
* `meta`: an [_Attr_], the contents of an attribute
153-
* `lifetime`: a [LIFETIME_TOKEN]
153+
* `ty`: a [_Type_]
154154
* `vis`: a possibly empty [_Visibility_] qualifier
155-
* `literal`: matches `-`<sup>?</sup>[_LiteralExpression_]
156155

157156
r[macro.decl.meta.transcription]
158157
In the transcriber, metavariables are referred to simply by `$`_name_, since

0 commit comments

Comments
 (0)