Closed
Description
Rust already warns for unmatchable cases in a match expression. Since NaN != NaN, any use of NaN (f64, float, other?) in a match pattern should generate the same unmatchable case warning.
If the reader is curious, the proper way to match NaN is something like:
match x {
x if f64::isNaN(x) => { ... }
...
}
For bonus points, the unmatchable case warning for NaN could mention this: "use isNaN in a guard expression instead".