Clean up a few things in rustc_hir_analysis::check::region by m-ou-se · Pull Request #138989 · 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

Conversation8 Commits4 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 }})

m-ou-se

Each commit is independent. They are all small clean-ups in rustc_hir_analysis::check::region.

@m-ou-se

@m-ou-se

There is no difference between the Patternand Borrow cases. Reduce it to a simple struct.

@m-ou-se

@m-ou-se

@m-ou-se m-ou-se added C-cleanup

Category: PRs that clean code up or issues documenting cleanup.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Mar 26, 2025

@rustbot

r? @cjgillot

rustbot has assigned @cjgillot.
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

@m-ou-se

@dingxiangfei2009

I would like to throw in my 👍 as well. The plan to expand RvalueCandidate* was later scrapped and it ends up appearing frivolous and should be simplified.

@jdonszelmann

Could you document in which case var_parent and parent are unequal? We figured out this was in if let right? With that I'll approve

@m-ou-se

There are many points at which var_parent and parent are unequal. In an if let is one of the places where it matters, but not the only one.

@m-ou-se

But that's not really the point of this PR anyway.

@jdonszelmann

alright, I see. After some (offline) discussion there indeed seems more at play here than if let. The summary was: the difference between these two variables seems to affect more than just if-let and these changes clean some things up on their own which seems good for now). Documenting (or changing) the exact difference here can be something for later, but this seems ok on its own then. @bors r=jdonszelmann,dingxiangfei2009 rollup

@bors

📌 Commit 2cc3fa3 has been approved by jdonszelmann,dingxiangfei2009

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

Mar 27, 2025

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

Mar 27, 2025

@bors

Rollup of 7 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

Mar 27, 2025

@rust-timer

Rollup merge of rust-lang#138989 - m-ou-se:clean-up-things, r=jdonszelmann,dingxiangfei2009

Clean up a few things in rustc_hir_analysis::check::region

Each commit is independent. They are all small clean-ups in rustc_hir_analysis::check::region.

Labels

C-cleanup

Category: PRs that clean code up or issues documenting cleanup.

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.