Skip to content

Commit b04860c

Browse files
NadrierilJoshua Nelson
authored andcommitted
Explain why exhaustiveness is necessary for soundness
1 parent ada57a3 commit b04860c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pat-exhaustive-checking.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ match x {
3737

3838
Thus usefulness is used for two purposes:
3939
detecting unreachable code (which is useful to the user),
40-
and ensuring that matches are exhaustive (which is important for soundness).
40+
and ensuring that matches are exhaustive (which is important for soundness,
41+
because a match expression can return a value).
4142

4243
## Where it happens
4344

0 commit comments

Comments
 (0)