Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jan 17, 2022
1 parent 21239a9 commit 9b91e9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/macros-by-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,10 @@ the syntax element that matched them. The keyword metavariable `$crate` can be
used to refer to the current crate; see [Hygiene] below. Metavariables can be
transcribed more than once or not at all.

For reasons of backwards compatibility, although `_` is a (keyword) identifier,
it is not matched by the `ident` fragment specifier. Similarly, though `_` [is
also an expression][_UnderscoreExpression_], a standalone underscore is not
matched by the `expr` fragment specifier. However, `_` is matched by the `expr`
fragment specifier when it appears as a subexpression.
For reasons of backwards compatibility, though `_` [is also an
expression][_UnderscoreExpression_], a standalone underscore is not matched by
the `expr` fragment specifier. However, `_` is matched by the `expr` fragment
specifier when it appears as a subexpression.

> **Edition Differences**: Starting with the 2021 edition, `pat` fragment-specifiers match top-level or-patterns (that is, they accept [_Pattern_]).
>
Expand Down
3 changes: 2 additions & 1 deletion src/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ usages and meanings are defined in the linked pages.
| `>=` | Ge | [Greater than or equal to][comparison], [Generics]
| `<=` | Le | [Less than or equal to][comparison]
| `@` | At | [Subpattern binding]
| `_` | Underscore | [Wildcard patterns], [Inferred types], Unnamed items in [constants], [extern crates], and [use declarations]
| `_` | Underscore | [Wildcard patterns], [Inferred types], Unnamed items in [constants], [extern crates], [use declarations], and [destructuring assignment]
| `.` | Dot | [Field access][field], [Tuple index]
| `..` | DotDot | [Range][range], [Struct expressions], [Patterns], [Range Patterns][rangepat]
| `...` | DotDotDot | [Variadic functions][extern], [Range patterns]
Expand Down Expand Up @@ -625,6 +625,7 @@ them are referred to as "token trees" in [macros]. The three types of brackets
[compound]: expressions/operator-expr.md#compound-assignment-expressions
[constants]: items/constant-items.md
[dereference]: expressions/operator-expr.md#the-dereference-operator
[destructuring assignment]: expressions/underscore-expr.md
[extern crates]: items/extern-crates.md
[extern]: items/external-blocks.md
[field]: expressions/field-expr.md
Expand Down

0 comments on commit 9b91e9b

Please sign in to comment.