1 error: this pattern matching can be expressed using equality
2 --> $DIR/equatable_if_let.rs:59:8
5 | ^^^^^^^^^ help: try: `a == 2`
7 = note: `-D clippy::equatable-if-let` implied by `-D warnings`
9 error: this pattern matching can be expressed using equality
10 --> $DIR/equatable_if_let.rs:60:8
12 LL | if let Ordering::Greater = a.cmp(&b) {}
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.cmp(&b) == Ordering::Greater`
15 error: this pattern matching can be expressed using equality
16 --> $DIR/equatable_if_let.rs:61:8
18 LL | if let Some(2) = c {}
19 | ^^^^^^^^^^^^^^^ help: try: `c == Some(2)`
21 error: this pattern matching can be expressed using equality
22 --> $DIR/equatable_if_let.rs:62:8
24 LL | if let Struct { a: 2, b: false } = d {}
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `d == (Struct { a: 2, b: false })`
27 error: this pattern matching can be expressed using equality
28 --> $DIR/equatable_if_let.rs:63:8
30 LL | if let Enum::TupleVariant(32, 64) = e {}
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == Enum::TupleVariant(32, 64)`
33 error: this pattern matching can be expressed using equality
34 --> $DIR/equatable_if_let.rs:64:8
36 LL | if let Enum::RecordVariant { a: 64, b: 32 } = e {}
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == (Enum::RecordVariant { a: 64, b: 32 })`
39 error: this pattern matching can be expressed using equality
40 --> $DIR/equatable_if_let.rs:65:8
42 LL | if let Enum::UnitVariant = e {}
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == Enum::UnitVariant`
45 error: this pattern matching can be expressed using equality
46 --> $DIR/equatable_if_let.rs:66:8
48 LL | if let (Enum::UnitVariant, &Struct { a: 2, b: false }) = (e, &d) {}
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(e, &d) == (Enum::UnitVariant, &Struct { a: 2, b: false })`
51 error: this pattern matching can be expressed using `matches!`
52 --> $DIR/equatable_if_let.rs:75:8
54 LL | if let NotPartialEq::A = f {}
55 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(f, NotPartialEq::A)`
57 error: this pattern matching can be expressed using equality
58 --> $DIR/equatable_if_let.rs:76:8
60 LL | if let NotStructuralEq::A = g {}
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g == NotStructuralEq::A`
63 error: this pattern matching can be expressed using `matches!`
64 --> $DIR/equatable_if_let.rs:77:8
66 LL | if let Some(NotPartialEq::A) = Some(f) {}
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(Some(f), Some(NotPartialEq::A))`
69 error: this pattern matching can be expressed using equality
70 --> $DIR/equatable_if_let.rs:78:8
72 LL | if let Some(NotStructuralEq::A) = Some(g) {}
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(g) == Some(NotStructuralEq::A)`
75 error: this pattern matching can be expressed using `matches!`
76 --> $DIR/equatable_if_let.rs:79:8
78 LL | if let NoPartialEqStruct { a: 2, b: false } = h {}
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(h, NoPartialEqStruct { a: 2, b: false })`
81 error: this pattern matching can be expressed using equality
82 --> $DIR/equatable_if_let.rs:86:8
84 LL | if let m1!(x) = "abc" {
85 | ^^^^^^^^^^^^^^^^^^ help: try: `"abc" == m1!(x)`
87 error: aborting due to 14 previous errors