Skip to content

Conversation

@jhpratt
Copy link
Member

@jhpratt jhpratt 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. labels Dec 24, 2025
@jhpratt jhpratt closed this Dec 24, 2025
@rustbot rustbot added rollup A PR which is a rollup and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 24, 2025
@jhpratt jhpratt deleted the rollup-7bxwsnj branch December 24, 2025 07:52
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 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.

4 participants