Skip to content

mir_build: Separate match lowering for string-equality and scalar-equality - #150581

Merged
bors merged 3 commits into
rust-lang:mainfrom
Zalathar:string
Jan 2, 2026
Merged

mir_build: Separate match lowering for string-equality and scalar-equality#150581
bors merged 3 commits into
rust-lang:mainfrom
Zalathar:string

Conversation

@Zalathar

Copy link
Copy Markdown
Member

This PR takes some match-lowering code that is responsible for equality tests, and splits it into distinct code paths for string-equality and scalar-equality.

The split results in more lines of code overall, but makes the separated code paths easier to understand individually.

r? Nadrieril

@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in match lowering

cc @Nadrieril

@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. labels Jan 2, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

Nadrieril is not on the review rotation at the moment.
They may take a while to respond.

@Nadrieril

Copy link
Copy Markdown
Member

Looks good! I like how that clarifies the little hack around str vs &str literals.

@bors r+ rollup

@bors

bors commented Jan 2, 2026

Copy link
Copy Markdown
Collaborator

📌 Commit 7749e75 has been approved by Nadrieril

It is now in the queue for this repository.

@borsbors 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 Jan 2, 2026
bors added a commit that referenced this pull request Jan 2, 2026
…uwer
Rollup of 6 pull requests
Successful merges:
- #150425 (mapping an error from cmd.spawn() in npm::install)
- #150444 (Expose kernel launch options as offload intrinsic args)
- #150495 (Correct hexagon "unwinder_private_data_size")
- #150578 (Fix a typo in the docs of AsMut for #149609)
- #150581 (mir_build: Separate match lowering for string-equality and scalar-equality)
- #150594 (Fix typo in the docs of `CString::from_vec_with_nul`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 9c6a4b0 into rust-lang:mainJan 2, 2026
11 checks passed
@rustbotrustbot added this to the 1.94.0 milestone Jan 2, 2026
rust-timer added a commit that referenced this pull request Jan 2, 2026
Rollup merge of #150581 - Zalathar:string, r=Nadrieril
mir_build: Separate match lowering for string-equality and scalar-equality
- Follow-up to #150238
---
This PR takes some match-lowering code that is responsible for equality tests, and splits it into distinct code paths for string-equality and scalar-equality.
The split results in more lines of code overall, but makes the separated code paths easier to understand individually.
r? Nadrieril
@Zalathar
Zalathar deleted the string branch January 2, 2026 23:15
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jan 2, 2026
…uwer
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#150425 (mapping an error from cmd.spawn() in npm::install)
- rust-lang/rust#150444 (Expose kernel launch options as offload intrinsic args)
- rust-lang/rust#150495 (Correct hexagon "unwinder_private_data_size")
- rust-lang/rust#150578 (Fix a typo in the docs of AsMut for rust-lang/rust#149609)
- rust-lang/rust#150581 (mir_build: Separate match lowering for string-equality and scalar-equality)
- rust-lang/rust#150594 (Fix typo in the docs of `CString::from_vec_with_nul`)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler 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

@Zalathar@rustbot@Nadrieril@bors