Skip to content

Conversation

@JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Dec 24, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

usamoi and others added 5 commits December 15, 2025 18:57
Unlike the other types covered by `PatConstKind::Other`, const-float patterns
can also interact with range patterns.
stabilize `lazy_get`

closes rust-lang#129333
FCP is finished in rust-lang#129333 (comment)

`@rustbot` modify labels: +T-libs-api
mir_build: Classify `TestableCase::Constant` into multiple sub-kinds

In match lowering, when choosing a test for a `TestableCase::Constant`, there is some ad-hoc logic for inspecting the pattern type and deciding what kind of test is suitable. There is also some very similar logic later, when partitioning cases into buckets based on the chosen test.

Instead of having that ad-hoc logic in multiple places, I think it's better to perform an up-front classification when lowering `thir::PatKind::Constant` to `TestableCase::Constant`, and then have the later steps simply match on an enum variant.

There should be no change to the resulting built MIR.

(I will note that the logic/invariants involved are a bit unclear, so there is a risk of accidental minor differences.)
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 24, 2025
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 24, 2025

📌 Commit 59f9b54 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants