Closed
Description
Consider:
const ONE: f32 = 1.0;
fn main() {
let v = 0.9;
let _ = v == ONE;
}
These are probably cases where you want to check for the exact constant, because it is a common argument, a sentinel value, or an integer converted to floating-point due to external APIs, etc.
There is already a special case for 0 and +/-inf, but I'd add a case for this situation too.