Deduplicate operand creation between scalars, non-scalars and string patterns by oli-obk · Pull Request #136121 · rust-lang/rust (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation7 Commits3 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

oli-obk

just something that felt duplicated and would make pattern type handling a bit more roundabout.

@oli-obk

@rustbot

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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.

labels

Jan 27, 2025

@oli-obk

compiler-errors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave a comment about why we update these. i.e. something like we're lowering to X.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@oli-obk

estebank

Comment on lines +154 to +155

match ty.kind() {
ty::Adt(def, _) if tcx.is_lang_item(def.did(), LangItem::String) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any stylistic reason for the match with a single arm over the let chain?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that I'll be adding a new variant immediately in a follow-up PR 😆

@estebank

@bors

📌 Commit d62f885 has been approved by estebank

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

Jan 28, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 29, 2025

@bors

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 29, 2025

@bors

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jan 29, 2025

@rust-timer

Rollup merge of rust-lang#136121 - oli-obk:push-zzvxlynmnqpp, r=estebank

Deduplicate operand creation between scalars, non-scalars and string patterns

just something that felt duplicated and would make pattern type handling a bit more roundabout.

github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request

Mar 11, 2025

@bors

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

Labels

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.