rust/compiler/rustc_pattern_analysis
bors 49649bf3c5 Auto merge of #128015 - Nadrieril:two-step-or-expansion, r=compiler-errors
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`
2024-07-23 06:35:42 +00:00
..
src Auto merge of #128015 - Nadrieril:two-step-or-expansion, r=compiler-errors 2024-07-23 06:35:42 +00:00
tests Add blank lines after module-level `//!` comments. 2024-06-20 09:23:20 +10:00
Cargo.toml bump tracing-tree to 0.3 2024-03-30 17:39:43 +03:00
messages.ftl Lint small gaps between ranges 2024-03-09 01:14:22 +01:00