Skip to content

Make HirEqInterExpr::eq_block take comments into account while checking if two blocks are equal #12074

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

Conversation

ARandomDev99
Copy link
Contributor

@ARandomDev99 ARandomDev99 commented Jan 2, 2024

This PR:

  • now makes HirEqInterExpr::eq_block take comments into account. Identical code with varying comments will no longer be considered equal.
  • makes necessary adjustments to UI tests.

Closes #12044

Lintcheck Changes

  • match_same_arms 53 => 52
  • if_same_then_else 3 => 0

changelog: [if_same_then_else]: Blocks with different comments will no longer trigger this lint.
changelog: [match_same_arms]: Arms with different comments will no longer trigger this lint.

This commit:
- now makes `HirEqInterExpr::eq_block` take comments into account. Identical code with varying comments will no longer be considered equal.
- makes necessary adjustments to UI tests.
@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2024

r? @xFrednet

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 2, 2024
@ARandomDev99
Copy link
Contributor Author

r? @Jarcho

@rustbot rustbot assigned Jarcho and unassigned xFrednet Jan 2, 2024
@Jarcho
Copy link
Contributor

Jarcho commented Jan 15, 2024

Thank you. @bors r+

@bors
Copy link
Contributor

bors commented Jan 15, 2024

📌 Commit 543d569 has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 15, 2024

⌛ Testing commit 543d569 with merge a9fa2f5...

@bors
Copy link
Contributor

bors commented Jan 15, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing a9fa2f5 to master...

@bors bors merged commit a9fa2f5 into rust-lang:master Jan 15, 2024
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.

match_same_arms: FP if arms have different comments
5 participants