提交 8b98e5a2 编写于 作者: B Brian Anderson

doc: Mention argument bindings in manual

上级 45e62d0a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册