Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #119688 - Nadrieril:dont-alloc-custom-wildcards, r=comp…
…iler-errors Exhaustiveness: use an `Option` instead of allocating fictitious patterns In the process of exhaustiveness checking, `Matrix` stores a 2D array of patterns. Those are subpatterns of the patterns we were provided as input, _except_ sometimes we allocate some extra wildcard patterns to fill a hole during specialization. Morally though, we could store `Option<&'p DeconstructedPat>` in the matrix, where `None` signifies a wildcard. That way we'd only have "real" patterns in the matrix and we wouldn't need the arena to allocate these wildcards. This is what this PR does. This is part of me splitting up rust-lang/rust#119581 for ease of review. r? `@compiler-errors`
- Loading branch information