let bindings can now be refutable too

This commit is contained in:
est31 2022-09-26 09:26:12 +02:00
parent a50e43ee79
commit 9e6a8c029e
1 changed files with 2 additions and 2 deletions

View File

@ -59,8 +59,8 @@ fn answer_to_life_the_universe_and_everything() -> i32 {
## Function parameters
As with `let` bindings, function parameters are irrefutable [patterns], so any
pattern that is valid in a let binding is also valid as a parameter:
Function parameters are irrefutable [patterns], so any pattern that is valid in
an else-less `let` binding is also valid as a parameter:
```rust
fn first((value, _): (i32, i32)) -> i32 { value }