ExhaustiveMatch
UpdatedThe rule behind this error is on the Exhaustive match page.
A match with no default must cover every value. For an enum, that is every variant, each with payloads that cover; Color.Red, a bare unit variant, Some(x), _, and a or b all count. When a variant has no arm, the compiler names it:
this match is not exhaustive: `Msg` has no arm for `Leave`; add it or a `default` arm
A literal, a struct, or an array pattern set needs a default, or a case _ or a binding after it. A guarded arm proves nothing about coverage.
The other direction is a lint: a default under arms that already cover every variant never runs, and unreachable_default says so, because that default would hide the next variant added.
