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

integer_arithmetic: detect integer arithmetic on references. #5329

Merged
merged 4 commits into from
Mar 18, 2020

Conversation

matthiaskrgr
Copy link
Member

changelog: integer_arithmetic fix false negatives with references on integers

Fixes #5328

@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Mar 18, 2020
Also fixes the same for float_arithmetic.

changelog: integer_arithmetic,float_arithmetic: fix false negatives with references on integers

Fixes rust-lang#5328
LL | (&f1 + &f2)
| ^^^^^^^^^^^

error: aborting due to 34 previous errors

Copy link
Member

Choose a reason for hiding this comment

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

Wait this should fail the --limit-stderr-length test 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I have a fix for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should I split up the into two, one for float and one for int arithmetic?

Copy link
Member

Choose a reason for hiding this comment

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

Would be good. I just pushed the fix for this here. So please pull before splitting up the tests.

@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Mar 18, 2020

📌 Commit ec1dcde has been approved by flip1995

@bors
Copy link
Contributor

bors commented Mar 18, 2020

⌛ Testing commit ec1dcde with merge e004b94...

@bors
Copy link
Contributor

bors commented Mar 18, 2020

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

@bors bors merged commit e004b94 into rust-lang:master Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy misses integer arithmetic when one operand is a reference
3 participants