Skip to content

Commit 5787bf3

Browse files
author
bors
committed
auto merge of rust-lang#6711 : catamorphism/rust/issue-5700, r=thestinger
r? @nikomatsakis
2 parents ed9a793 + 248a669 commit 5787bf3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/rust.md

+5-4
Original file line numberDiff line numberDiff 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

24432444
A pattern that's just an identifier,
24442445
like `Nil` in the previous answer,

0 commit comments

Comments
 (0)