2 #![warn(clippy::comparison_chain)]
8 fn f(x: u8, y: u8, z: u8) {
9 // Ignored: Only one branch
20 // Ignored: Only one explicit conditional
51 // Ignored: Binop args are not equivalent
60 // Ignored: Binop args are not equivalent
69 // Ignored: Not binary comparisons
79 #[allow(clippy::float_cmp)]
80 fn g(x: f64, y: f64, z: f64) {
81 // Ignored: f64 doesn't implement Ord
88 // Ignored: f64 doesn't implement Ord
97 // Ignored: f64 doesn't implement Ord
106 // Ignored: f64 doesn't implement Ord
116 fn h<T: Ord>(x: T, y: T, z: T) {
140 // The following uses should be ignored
142 use super::{a, b, c};
147 fn same_operation_equals() {
148 // operands are fixed
152 } else if foo() == 42 {
158 } else if foo() == 42 {
164 // operands are transposed
168 } else if 42 == foo() {
173 fn same_operation_not_equals() {
174 // operands are fixed
178 } else if foo() > 42 {
184 } else if foo() > 42 {
192 } else if foo() < 42 {
198 } else if foo() < 42 {