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