Skip to content

Stop suggesting a float truncation that is not shorter #7722

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
Sep 27, 2021

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Sep 26, 2021

Fixes #7721.

Previously Clippy would say that a number has excessive precision even if it has the minimum possible precision for the floating point value that it corresponds to.

changelog: Fix [excessive_precision] being triggered on floats that are already written in shortest form

@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 Sep 26, 2021
@giraffate
Copy link
Contributor

@bors r+

It looks good, thanks!

@bors
Copy link
Contributor

bors commented Sep 27, 2021

📌 Commit e63d692 has been approved by giraffate

@bors
Copy link
Contributor

bors commented Sep 27, 2021

⌛ Testing commit e63d692 with merge 30fe4ba...

@bors
Copy link
Contributor

bors commented Sep 27, 2021

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

@bors bors merged commit 30fe4ba into rust-lang:master Sep 27, 2021
@dtolnay dtolnay deleted the float branch September 27, 2021 01:10
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.

False positive in excessive_precision for floats that are already in shortest form
4 participants