mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
49649bf3c5
match exhaustiveness: Expand or-patterns as a separate step To compute exhaustiveness, we must expand or-patterns. Previously, we expanded them at the same time that we pushed patterns into the matrix. This made it harder to track pattern reachability, because the or-pattern itself would never show up in the matrix so we had to recover missing information. This PR changes that: we no longer expand or-patterns as we push them into the matrix. Instead, if we find an or-pattern in the matrix we expand them in a step very much like the specialization we already do. This simplifies a bunch of things, and should greatly simplify the implementation of https://github.com/rust-lang/rust/issues/127870. r? `@compiler-errors` |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
messages.ftl |