fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: redundant guard 2 --> $DIR/redundant_guards.rs:33:20 3 | 4LL | C(x, y) if let 1 = y => .., 5 | ^^^^^^^^^ 6 | 7 = note: `-D clippy::redundant-guards` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::redundant_guards)]` 9help: try 10 | 11LL - C(x, y) if let 1 = y => .., 12LL + C(x, 1) => .., 13 | 14 15error: redundant guard 16 --> $DIR/redundant_guards.rs:39:20 17 | 18LL | Some(x) if matches!(x, Some(1) if true) => .., 19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20 | 21help: try 22 | 23LL | Some(Some(1)) if true => .., 24 | ~~~~~~~ ~~~~~~~ 25 26error: redundant guard 27 --> $DIR/redundant_guards.rs:40:20 28 | 29LL | Some(x) if matches!(x, Some(1)) => { 30 | ^^^^^^^^^^^^^^^^^^^^ 31 | 32help: try 33 | 34LL - Some(x) if matches!(x, Some(1)) => { 35LL + Some(Some(1)) => { 36 | 37 38error: redundant guard 39 --> $DIR/redundant_guards.rs:44:20 40 | 41LL | Some(x) if let Some(1) = x => .., 42 | ^^^^^^^^^^^^^^^ 43 | 44help: try 45 | 46LL - Some(x) if let Some(1) = x => .., 47LL + Some(Some(1)) => .., 48 | 49 50error: redundant guard 51 --> $DIR/redundant_guards.rs:45:20 52 | 53LL | Some(x) if x == Some(2) => .., 54 | ^^^^^^^^^^^^ 55 | 56help: try 57 | 58LL - Some(x) if x == Some(2) => .., 59LL + Some(Some(2)) => .., 60 | 61 62error: redundant guard 63 --> $DIR/redundant_guards.rs:46:20 64 | 65LL | Some(x) if Some(2) == x => .., 66 | ^^^^^^^^^^^^ 67 | 68help: try 69 | 70LL - Some(x) if Some(2) == x => .., 71LL + Some(Some(2)) => .., 72 | 73 74error: redundant guard 75 --> $DIR/redundant_guards.rs:71:20 76 | 77LL | B { e } if matches!(e, Some(A(2))) => .., 78 | ^^^^^^^^^^^^^^^^^^^^^^^ 79 | 80help: try 81 | 82LL - B { e } if matches!(e, Some(A(2))) => .., 83LL + B { e: Some(A(2)) } => .., 84 | 85 86error: redundant guard 87 --> $DIR/redundant_guards.rs:108:20 88 | 89LL | E::A(y) if y == "not from an or pattern" => {}, 90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 91 | 92help: try 93 | 94LL - E::A(y) if y == "not from an or pattern" => {}, 95LL + E::A("not from an or pattern") => {}, 96 | 97 98error: redundant guard 99 --> $DIR/redundant_guards.rs:115:14 100 | 101LL | x if matches!(x, Some(0)) => .., 102 | ^^^^^^^^^^^^^^^^^^^^ 103 | 104help: try 105 | 106LL - x if matches!(x, Some(0)) => .., 107LL + Some(0) => .., 108 | 109 110error: redundant guard 111 --> $DIR/redundant_guards.rs:165:28 112 | 113LL | Some(ref x) if x == &1 => {}, 114 | ^^^^^^^ 115 | 116help: try 117 | 118LL - Some(ref x) if x == &1 => {}, 119LL + Some(1) => {}, 120 | 121 122error: redundant guard 123 --> $DIR/redundant_guards.rs:166:28 124 | 125LL | Some(ref x) if &1 == x => {}, 126 | ^^^^^^^ 127 | 128help: try 129 | 130LL - Some(ref x) if &1 == x => {}, 131LL + Some(1) => {}, 132 | 133 134error: redundant guard 135 --> $DIR/redundant_guards.rs:167:28 136 | 137LL | Some(ref x) if let &2 = x => {}, 138 | ^^^^^^^^^^ 139 | 140help: try 141 | 142LL - Some(ref x) if let &2 = x => {}, 143LL + Some(2) => {}, 144 | 145 146error: redundant guard 147 --> $DIR/redundant_guards.rs:168:28 148 | 149LL | Some(ref x) if matches!(x, &3) => {}, 150 | ^^^^^^^^^^^^^^^ 151 | 152help: try 153 | 154LL - Some(ref x) if matches!(x, &3) => {}, 155LL + Some(3) => {}, 156 | 157 158error: redundant guard 159 --> $DIR/redundant_guards.rs:188:32 160 | 161LL | B { ref c, .. } if c == &1 => {}, 162 | ^^^^^^^ 163 | 164help: try 165 | 166LL - B { ref c, .. } if c == &1 => {}, 167LL + B { c: 1, .. } => {}, 168 | 169 170error: redundant guard 171 --> $DIR/redundant_guards.rs:189:32 172 | 173LL | B { ref c, .. } if &1 == c => {}, 174 | ^^^^^^^ 175 | 176help: try 177 | 178LL - B { ref c, .. } if &1 == c => {}, 179LL + B { c: 1, .. } => {}, 180 | 181 182error: redundant guard 183 --> $DIR/redundant_guards.rs:190:32 184 | 185LL | B { ref c, .. } if let &1 = c => {}, 186 | ^^^^^^^^^^ 187 | 188help: try 189 | 190LL - B { ref c, .. } if let &1 = c => {}, 191LL + B { c: 1, .. } => {}, 192 | 193 194error: redundant guard 195 --> $DIR/redundant_guards.rs:191:32 196 | 197LL | B { ref c, .. } if matches!(c, &1) => {}, 198 | ^^^^^^^^^^^^^^^ 199 | 200help: try 201 | 202LL - B { ref c, .. } if matches!(c, &1) => {}, 203LL + B { c: 1, .. } => {}, 204 | 205 206error: aborting due to 17 previous errors 207