
Rust match exhaustiveness and refactoring

Alice Ryhl: You cannot mess up switch statements in Rust
Podcast episode
Published May 26, 2026 · Clip 0:00–0:41 (0:41)
The conversation discusses how Rust handles exhaustive matching on enums, analogous to switch statements in other languages. The guest explains that Rust's match construct requires a branch for every enum variant, making missed cases a compiler error. This leads into how the compiler supports safe refactoring by identifying all code locations needing updates. The guest describes a workflow of fixing compiler errors until the compiler is satisfied.