File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2435,10 +2435,11 @@ match x {
24352435}
24362436~~~~
24372437
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 ``` .
24422443
24432444A pattern that's just an identifier,
24442445like ` Nil ` in the previous answer,
You can’t perform that action at this time.
0 commit comments