Skip to content

Refactor assigning_clones #13043

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

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Refactor assigning_clones #13043

merged 1 commit into from
Jul 8, 2024

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Jul 5, 2024

Short list of changes:

  • Inline and simplify extract_call
  • Inline is_ok_to_suggest
  • Inline skip_drop_block
  • Check the HIR tree before the macro check
  • Don't call outer_expn_data
  • Use find instead of a loop in clone_source_borrows_from_dest

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Jul 5, 2024

r? @Manishearth

rustbot has assigned @Manishearth.
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 Jul 5, 2024
* Merge some code paths
* Use `find` instead of a loop
* Move macro check to after hir pattern matching
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 8, 2024

📌 Commit d9ab0a7 has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 8, 2024

⌛ Testing commit d9ab0a7 with merge 058e6ea...

@bors
Copy link
Contributor

bors commented Jul 8, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 058e6ea to master...

@bors bors merged commit 058e6ea into rust-lang:master Jul 8, 2024
8 checks passed
@Kobzol
Copy link
Contributor

Kobzol commented Jul 12, 2024

@Jarcho I'm curious, do you really find the new version to be more readable? Before, it was quite easy for me to follow the logic of the lint, because it was quite simple sequential code. Now the main selection logic is in a single expression that has 13 && operators... I find it very difficult to make sense of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants