Skip to content

Commit

Permalink
doc: Mention argument bindings in manual
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Dec 21, 2012
1 parent 45e62d0 commit 8b98e5a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8b98e5a

Please sign in to comment.