11error: this pattern matching can be expressed using equality
2- --> tests/ui/equatable_if_let.rs:64 :8
2+ --> tests/ui/equatable_if_let.rs:56 :8
33 |
44LL | if let 2 = a {}
55 | ^^^^^^^^^ help: try: `a == 2`
@@ -8,97 +8,97 @@ LL | if let 2 = a {}
88 = help: to override `-D warnings` add `#[allow(clippy::equatable_if_let)]`
99
1010error: this pattern matching can be expressed using equality
11- --> tests/ui/equatable_if_let.rs:66 :8
11+ --> tests/ui/equatable_if_let.rs:58 :8
1212 |
1313LL | if let Ordering::Greater = a.cmp(&b) {}
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.cmp(&b) == Ordering::Greater`
1515
1616error: this pattern matching can be expressed using equality
17- --> tests/ui/equatable_if_let.rs:68 :8
17+ --> tests/ui/equatable_if_let.rs:60 :8
1818 |
1919LL | if let Some(2) = c {}
2020 | ^^^^^^^^^^^^^^^ help: try: `c == Some(2)`
2121
2222error: this pattern matching can be expressed using equality
23- --> tests/ui/equatable_if_let.rs:70 :8
23+ --> tests/ui/equatable_if_let.rs:62 :8
2424 |
2525LL | if let Struct { a: 2, b: false } = d {}
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `d == (Struct { a: 2, b: false })`
2727
2828error: this pattern matching can be expressed using equality
29- --> tests/ui/equatable_if_let.rs:72 :8
29+ --> tests/ui/equatable_if_let.rs:64 :8
3030 |
3131LL | if let Enum::TupleVariant(32, 64) = e {}
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == Enum::TupleVariant(32, 64)`
3333
3434error: this pattern matching can be expressed using equality
35- --> tests/ui/equatable_if_let.rs:74 :8
35+ --> tests/ui/equatable_if_let.rs:66 :8
3636 |
3737LL | if let Enum::RecordVariant { a: 64, b: 32 } = e {}
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == (Enum::RecordVariant { a: 64, b: 32 })`
3939
4040error: this pattern matching can be expressed using equality
41- --> tests/ui/equatable_if_let.rs:76 :8
41+ --> tests/ui/equatable_if_let.rs:68 :8
4242 |
4343LL | if let Enum::UnitVariant = e {}
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == Enum::UnitVariant`
4545
4646error: this pattern matching can be expressed using equality
47- --> tests/ui/equatable_if_let.rs:78 :8
47+ --> tests/ui/equatable_if_let.rs:70 :8
4848 |
4949LL | if let (Enum::UnitVariant, &Struct { a: 2, b: false }) = (e, &d) {}
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(e, &d) == (Enum::UnitVariant, &Struct { a: 2, b: false })`
5151
5252error: this pattern matching can be expressed using `matches!`
53- --> tests/ui/equatable_if_let.rs:88 :8
53+ --> tests/ui/equatable_if_let.rs:80 :8
5454 |
5555LL | if let NotPartialEq::A = f {}
5656 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(f, NotPartialEq::A)`
5757
5858error: this pattern matching can be expressed using equality
59- --> tests/ui/equatable_if_let.rs:90 :8
59+ --> tests/ui/equatable_if_let.rs:82 :8
6060 |
6161LL | if let NotStructuralEq::A = g {}
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g == NotStructuralEq::A`
6363
6464error: this pattern matching can be expressed using `matches!`
65- --> tests/ui/equatable_if_let.rs:92 :8
65+ --> tests/ui/equatable_if_let.rs:84 :8
6666 |
6767LL | if let Some(NotPartialEq::A) = Some(f) {}
6868 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(Some(f), Some(NotPartialEq::A))`
6969
7070error: this pattern matching can be expressed using equality
71- --> tests/ui/equatable_if_let.rs:94 :8
71+ --> tests/ui/equatable_if_let.rs:86 :8
7272 |
7373LL | if let Some(NotStructuralEq::A) = Some(g) {}
7474 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(g) == Some(NotStructuralEq::A)`
7575
7676error: this pattern matching can be expressed using `matches!`
77- --> tests/ui/equatable_if_let.rs:96 :8
77+ --> tests/ui/equatable_if_let.rs:88 :8
7878 |
7979LL | if let NoPartialEqStruct { a: 2, b: false } = h {}
8080 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(h, NoPartialEqStruct { a: 2, b: false })`
8181
8282error: this pattern matching can be expressed using equality
83- --> tests/ui/equatable_if_let.rs:99 :8
83+ --> tests/ui/equatable_if_let.rs:91 :8
8484 |
8585LL | if let inline!("abc") = "abc" {
8686 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"abc" == inline!("abc")`
8787
8888error: this pattern matching can be expressed using `matches!`
89- --> tests/ui/equatable_if_let.rs:109 :12
89+ --> tests/ui/equatable_if_let.rs:101 :12
9090 |
9191LL | if let Some('i') = cs.iter().next() {
9292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(cs.iter().next(), Some('i'))`
9393
9494error: this pattern matching can be expressed using `matches!`
95- --> tests/ui/equatable_if_let.rs:117 :12
95+ --> tests/ui/equatable_if_let.rs:109 :12
9696 |
9797LL | if let Some(1) = cs.iter().next() {
9898 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(cs.iter().next(), Some(1))`
9999
100100error: this pattern matching can be expressed using `matches!`
101- --> tests/ui/equatable_if_let.rs:135 :12
101+ --> tests/ui/equatable_if_let.rs:127 :12
102102 |
103103LL | if let Some(MyEnum::B) = get_enum() {
104104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(get_enum(), Some(MyEnum::B))`
0 commit comments