summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-12-20 17:01:38 -0800
committerBrian Anderson <banderson@mozilla.com>2012-12-20 17:01:38 -0800
commit8b98e5a296d95c5e832db0756828e5bec31c6f50 (patch)
tree6586c52a1d666503f09a534b378017638d32dd2c /doc
parent45e62d0a144f336e2ad849c1bb7767a12f312643 (diff)
doc: Mention argument bindings in manualrelease-0.50.5
Diffstat (limited to 'doc')
-rw-r--r--doc/rust.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/rust.md b/doc/rust.md
index 3a3c371accd..210e07d198a 100644
--- a/doc/rust.md
+++ b/doc/rust.md
@@ -876,6 +876,13 @@ fn add(x: int, y: int) -> int {
}
~~~~
+As with `let` bindings, function arguments are irrefutable patterns,
+so any pattern that is valid in a let binding is also valid as an argument.
+
+~~~
+fn first((value, _): (int, int)) -> int { value }
+~~~
+
#### Generic functions