Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #119688 - Nadrieril:dont-alloc-custom-wildcards, r=compiler-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 https://github.com/rust-lang/rust/pull/119581 for ease of review. r? `@compiler-errors`
bors 2024-01-11
parent b41a1a4 · parent c49e0c4 · commit ac98cdf
0 files changed, 0 insertions, 0 deletions