Skip to content

Commit 4ea8e34

Browse files
committed
More review comments.
1 parent 52a335e commit 4ea8e34

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/expressions/match-expr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
>    `if` [_Expression_]
2525
2626
A *`match` expression* branches on a pattern. The exact form of matching that
27-
occurs depends on the [pattern][Patterns]. A `match`
27+
occurs depends on the [pattern]. A `match`
2828
expression has a *head expression*, which is the value to compare to the
2929
patterns. The head expression and the patterns must have the same type.
3030

@@ -131,7 +131,7 @@ meaning on match arms are [`cfg`], `cold`, and the [lint check attributes].
131131
[Range Expression]: expressions/range-expr.html
132132
133133
[_Pattern_]: patterns.html
134-
[Patterns]: patterns.html
134+
[pattern]: patterns.html
135135
[Identifier Patterns]: patterns.html#identifier-patterns
136136
[Struct Patterns]: patterns.html#struct-patterns
137137
[Tuple Struct Patterns]: patterns.html#tuplestruct-patterns

src/patterns.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ for i in -2..5 {
171171
Identifier patterns bind the value they match to a variable. The identifier
172172
must be unique within the pattern. The variable will shadow any variables of
173173
the same name in scope. The scope of the new binding depends on the context of
174-
where the pattern is used (such as a `let` binding versus a `match` arm).
174+
where the pattern is used (such as a `let` binding or a `match` arm).
175175

176176
Patterns that consist of only an identifier, possibly with a `mut`, like
177177
`variable`, `x`, and `y` below:
@@ -201,7 +201,7 @@ match x {
201201
binds to `e` the value 2 (not the entire range: the range here is a range subpattern).
202202

203203
By default, identifier patterns bind a variable to a copy of or move from the
204-
matched value depending on whether the matched value implements [Copy].
204+
matched value depending on whether the matched value implements [`Copy`].
205205
This can be changed to bind to a reference by using the `ref` keyword,
206206
or to a mutable reference using `ref mut`. For example:
207207

@@ -648,7 +648,7 @@ refer to refutable constants or enum variants for enums with multiple variants.
648648
[_SlicePattern_]: #slice-patterns
649649
[_PathPattern_]: #path-patterns
650650

651-
[Copy]: special-types-and-traits.html#copy
651+
[`Copy`]: special-types-and-traits.html#copy
652652
[IDENTIFIER]: identifiers.html
653653
[enums]: items/enumerations.html
654654
[literals]: expressions/literal-expr.html

0 commit comments

Comments
 (0)