Abstract
Rust developers trust `match` to catch unhandled cases, but how does this bit of compiler magic actually work? While building Lisette, a language inspired by Rust that compiles to Go, I found myself implementing an exhaustiveness checker from scratch in Rust using a Maranget-style algorithm. This turned Rust's familiar behavior into explicit machinery and concrete design decisions.
In this talk, I'll show how exhaustiveness checking works in Lisette: how patterns are normalized, how specialization drives the recursion, how missing coverage is reported through witnesses, and why edge cases like or-patterns, uninhabited types, and slice matching complicate the story.
The result is a practical mental model of the guarantees Rust programmers rely on every time they write a `match` expression.