We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e46de53 commit 57c203eCopy full SHA for 57c203e
doc/rust.md
@@ -2206,7 +2206,12 @@ fn main() {
2206
}
2207
~~~~
2208
2209
-A pattern that's just a variable binding,
+Patterns that bind variables default to binding to a copy of the matched value. This can be made
2210
+explicit using the ```copy``` keyword, changed to bind to a borrowed pointer by using the ```ref```
2211
+keyword, or to a mutable borrowed pointer using ```ref mut```, or the value can be moved into
2212
+the new binding using ```move```.
2213
+
2214
+A pattern that's just an identifier,
2215
like `Nil` in the previous answer,
2216
could either refer to an enum variant that's in scope,
2217
or bind a new variable.
0 commit comments