Skip to content

Commit

Permalink
let bindings can now be refutable too
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Oct 4, 2022
1 parent a50e43e commit 9e6a8c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/items/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 9e6a8c0

Please sign in to comment.