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