Skip to content

Commit c96271e

Browse files
committed
Add note about pattern types
1 parent a28cf48 commit c96271e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pattern-matching/infallible.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ fn main() {
3434
- All of the demonstrated patterns are _irrefutable_, meaning that they will
3535
always match the value on the right hand side.
3636

37+
- Patterns are type-specific, including irrefutable patterns. Try adding or
38+
removing an element to the tuple and look at the resulting compiler errors.
39+
3740
- Variable names are patterns that always match and which bind the matched value
3841
into a new variable with that name.
3942

0 commit comments

Comments
 (0)