about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-23 06:35:42 +0000
committerbors <bors@rust-lang.org>2024-07-23 06:35:42 +0000
commit49649bf3c5538531ade6834b9b308a6c8a5f3e8e (patch)
tree6a6906cb6618bd98c8fc47b24ab757e6cc38f25d /library/std/src
parent8ded1341983916dcac1c831e8ed8d5638a3a99e0 (diff)
parent670723e6fba094fa613082261ad89de387af7939 (diff)
downloadrust-49649bf3c5538531ade6834b9b308a6c8a5f3e8e.tar.gz
rust-49649bf3c5538531ade6834b9b308a6c8a5f3e8e.zip
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`
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions