Skip to content

Conversation

@thestinger
Copy link
Contributor

No description provided.

The `std::cmp` functions are not correct for floating point types.

`min(NaN, 2.0)` and `min(2.0, NaN)` return different values, because
these functions assume a total order. Floating point types need special
`min`, `max` and `clamp` functions.
bors added a commit that referenced this pull request Mar 5, 2014
@bors bors closed this Mar 5, 2014
@bors bors merged commit 28d4f80 into rust-lang:master Mar 5, 2014
@thestinger thestinger deleted the float branch March 5, 2014 23:19
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 13, 2024
…archo

[`overly_complex_bool_expr`]: Fix trigger wrongly on never type

fixes rust-lang#12689

---

changelog: fix [`overly_complex_bool_expr`] triggers wrongly on never type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants