Skip to content

[arithmetic_side_effects] Fix #10209#10310

Merged
bors merged 2 commits into
rust-lang:masterfrom
c410-f3r:arith-2
Feb 12, 2023
Merged

[arithmetic_side_effects] Fix #10209#10310
bors merged 2 commits into
rust-lang:masterfrom
c410-f3r:arith-2

Conversation

@c410-f3r

@c410-f3r c410-f3r commented Feb 9, 2023

Copy link
Copy Markdown
Contributor

Fix #10209


changelog: Enhancement: [arithmetic_side_effects]: No longer lints, if safe constant values are used.
#10310

@rustbot

rustbot commented Feb 9, 2023

Copy link
Copy Markdown
Collaborator

r? @Alexendoo

(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 Feb 9, 2023

@Alexendoo Alexendoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, looks good

Since the lint is doing a moderate amount of work it'd be worth adding an is_lint_allowed check in should_skip_expr

@c410-f3r

Copy link
Copy Markdown
Contributor Author

Thanks, looks good

Since the lint is doing a moderate amount of work it'd be worth adding an is_lint_allowed check in should_skip_expr

Done

@Alexendoo

Copy link
Copy Markdown
Member

👍

@bors r+

@bors

bors commented Feb 12, 2023

Copy link
Copy Markdown
Contributor

📌 Commit 1ed8ed3 has been approved by Alexendoo

It is now in the queue for this repository.

@bors

bors commented Feb 12, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit 1ed8ed3 with merge 6f353fd...

@bors

bors commented Feb 12, 2023

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 6f353fd to master...

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.

arithmetic_side_effects: can’t see through trivial constant items

4 participants