2 Checks for the usage of negated comparison operators on types which only implement
3 `PartialOrd` (e.g., `f64`).
6 These operators make it easy to forget that the underlying types actually allow not only three
7 potential Orderings (Less, Equal, Greater) but also a fourth one (Uncomparable). This is
8 especially easy to miss if the operator based comparison result is negated.
15 let not_less_or_equal = !(a <= b);
20 use std::cmp::Ordering;
22 let _not_less_or_equal = match a.partial_cmp(&b) {
23 None | Some(Ordering::Greater) => true,