Skip to content

Rollup of 2 pull requests - #150333

Closed
jhpratt wants to merge 5 commits into
rust-lang:mainfrom
jhpratt:rollup-7bxwsnj
Closed

Rollup of 2 pull requests#150333
jhpratt wants to merge 5 commits into
rust-lang:mainfrom
jhpratt:rollup-7bxwsnj

Conversation

@jhpratt

@jhprattjhpratt commented Dec 24, 2025

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

usamoiand 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`
closesrust-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.)
@rustbotrustbot 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
@jhprattjhpratt closed this Dec 24, 2025
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant 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

@jhpratt@rustbot@usamoi@Zalathar