2021-10-04 06:33:40 +00:00
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:53:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let 2 = a {}
|
|
|
|
| ^^^^^^^^^ help: try: `a == 2`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::equatable-if-let` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:54:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Ordering::Greater = a.cmp(&b) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `a.cmp(&b) == Ordering::Greater`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:55:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Some(2) = c {}
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `c == Some(2)`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:56:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Struct { a: 2, b: false } = d {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `d == (Struct { a: 2, b: false })`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:57:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Enum::TupleVariant(32, 64) = e {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == Enum::TupleVariant(32, 64)`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:58:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Enum::RecordVariant { a: 64, b: 32 } = e {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == (Enum::RecordVariant { a: 64, b: 32 })`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:59:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Enum::UnitVariant = e {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e == Enum::UnitVariant`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:60:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let (Enum::UnitVariant, &Struct { a: 2, b: false }) = (e, &d) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(e, &d) == (Enum::UnitVariant, &Struct { a: 2, b: false })`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:70:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let NotStructuralEq::A = g {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g == NotStructuralEq::A`
|
|
|
|
|
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:72:8
|
2021-10-04 06:33:40 +00:00
|
|
|
|
|
|
|
|
LL | if let Some(NotStructuralEq::A) = Some(g) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(g) == Some(NotStructuralEq::A)`
|
|
|
|
|
2021-10-08 13:26:10 +00:00
|
|
|
error: this pattern matching can be expressed using equality
|
2022-06-30 15:45:34 +00:00
|
|
|
--> $DIR/equatable_if_let.rs:79:8
|
2021-10-08 13:26:10 +00:00
|
|
|
|
|
|
|
|
LL | if let m1!(x) = "abc" {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `"abc" == m1!(x)`
|
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
2021-10-04 06:33:40 +00:00
|
|
|
|