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

clarify margin of error in wording of float comparison operator lint messages #6043

Merged
merged 2 commits into from
Sep 15, 2020

Conversation

HaramanJohal
Copy link
Contributor

fixes #6040

changelog: change wording of float comparison operator to make margin of error less ambiguous

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthiaskrgr (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 14, 2020
@fvsch
Copy link

fvsch commented Sep 15, 2020

I think the float_cmp_const lint has the same issue, and the examples for both could maybe use the same variable name:
https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp

@HaramanJohal
Copy link
Contributor Author

I think the float_cmp_const lint has the same issue, and the examples for both could maybe use the same variable name:
https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp

Hi @fvsch thanks for the comment but I couldn't find another place in the code where float_cmp_const needs to be changed. I am also not sure where I need to go to edit the examples. Please could you point me in the right direction for these?

Happy to make the changes, but new to the repo and searching doesn't seem to turn anything up.

@matthiaskrgr
Copy link
Member

@HaramanJohal the lint docs are at the top of the misc.rs file

/// if (y - 1.23f64).abs() < error { }

@matthiaskrgr
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Sep 15, 2020

📌 Commit 16b6ceb has been approved by matthiaskrgr

@bors
Copy link
Contributor

bors commented Sep 15, 2020

⌛ Testing commit 16b6ceb with merge 0695f21...

@bors
Copy link
Contributor

bors commented Sep 15, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: matthiaskrgr
Pushing 0695f21 to master...

@bors bors merged commit 0695f21 into rust-lang:master Sep 15, 2020
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.

The word "error" in float_cmp can be confusing
5 participants