File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2435,10 +2435,11 @@ match x {
2435
2435
}
2436
2436
~~~~
2437
2437
2438
- Patterns that bind variables default to binding to a copy of the matched value. This can be made
2439
- explicit using the ``` copy ``` keyword, changed to bind to a borrowed pointer by using the ``` ref ```
2440
- keyword, or to a mutable borrowed pointer using ``` ref mut ``` , or the value can be moved into
2441
- the new binding using ``` move ``` .
2438
+ Patterns that bind variables default to binding to a copy or move of the matched value
2439
+ (depending on the matched value's type).
2440
+ This can be made explicit using the ``` copy ``` keyword,
2441
+ changed to bind to a borrowed pointer by using the ``` ref ``` keyword,
2442
+ or to a mutable borrowed pointer using ``` ref mut ``` .
2442
2443
2443
2444
A pattern that's just an identifier,
2444
2445
like ` Nil ` in the previous answer,
You can’t perform that action at this time.
0 commit comments