Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Mar 27, 2025

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Mar 26, 2025

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

m-ou-se added 4 commits March 26, 2025 17:18
There is no difference between the Patternand Borrow cases. Reduce it to
a simple struct.
@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
Copy link
Collaborator

rustbot commented Mar 26, 2025

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 26, 2025
@m-ou-se
Copy link
Member Author

m-ou-se commented Mar 26, 2025

@dingxiangfei2009 I think you are familiar with this code.

@dingxiangfei2009
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Member Author

m-ou-se commented Mar 27, 2025

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
Copy link
Member Author

m-ou-se commented Mar 27, 2025

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

@jdonszelmann
Copy link
Contributor

jdonszelmann commented Mar 27, 2025

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
Copy link
Collaborator

bors commented Mar 27, 2025

📌 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
Rollup of 7 pull requests

Successful merges:

 - rust-lang#138844 (expand: Leave traces when expanding `cfg` attributes)
 - rust-lang#138926 (Remove `kw::Empty` uses from `rustc_middle`.)
 - rust-lang#138989 (Clean up a few things in rustc_hir_analysis::check::region)
 - rust-lang#138999 (Report compiletest pass mode if forced)
 - rust-lang#139014 (Improve suggest construct with literal syntax instead of calling)
 - rust-lang#139015 (Remove unneeded LLVM CI test assertions)
 - rust-lang#139016 (Add job duration changes to post-merge analysis report)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 322d1c1 into rust-lang:master Mar 27, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 27, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2025
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.
@m-ou-se m-ou-se deleted the clean-up-things branch March 28, 2025 07:13
@m-ou-se m-ou-se mentioned this pull request Mar 28, 2025
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants