Skip to content

Conversation

lukaslueg
Copy link
Contributor

@lukaslueg lukaslueg commented Aug 31, 2022

There used to be an early return if the receiver was an effective const but the method was not linted, not taking into account later cases where the receiver and the arguments are both effective consts for different methods. Removed the early return.

Fixes #9402
Fixes #9201

changelog: Fix suboptimal_flops, imprecise_flops not linting on {const}.powf({const}) et al

@rust-highfive
Copy link

r? @giraffate

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 31, 2022
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

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

Overall looks good, thanks! I made one comment.

@lukaslueg
Copy link
Contributor Author

Good catch, I didn't see that there were two distinct lints. Both get triggered in the same execution path though.

@lukaslueg lukaslueg requested a review from giraffate September 1, 2022 10:58
@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Sep 1, 2022

📌 Commit 6e14e60 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 1, 2022

⌛ Testing commit 6e14e60 with merge a80e278...

@bors
Copy link
Contributor

bors commented Sep 1, 2022

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

@bors bors merged commit a80e278 into rust-lang:master Sep 1, 2022
@lukaslueg lukaslueg deleted the issue9402 branch September 1, 2022 15:41
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.

imprecise_flops not raised in some situations Use cube root function lint
4 participants