2023-07-31 21:53:53 +00:00
|
|
|
error: redundant guard
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/redundant_guards.rs:33:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | C(x, y) if let 1 = y => ..,
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-guards` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_guards)]`
|
2023-07-31 21:53:53 +00:00
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - C(x, y) if let 1 = y => ..,
|
|
|
|
LL + C(x, 1) => ..,
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/redundant_guards.rs:39:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | Some(x) if matches!(x, Some(1) if true) => ..,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL | Some(Some(1)) if true => ..,
|
|
|
|
| ~~~~~~~ ~~~~~~~
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/redundant_guards.rs:40:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | Some(x) if matches!(x, Some(1)) => {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(x) if matches!(x, Some(1)) => {
|
|
|
|
LL + Some(Some(1)) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/redundant_guards.rs:44:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | Some(x) if let Some(1) = x => ..,
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(x) if let Some(1) = x => ..,
|
|
|
|
LL + Some(Some(1)) => ..,
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/redundant_guards.rs:45:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | Some(x) if x == Some(2) => ..,
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(x) if x == Some(2) => ..,
|
|
|
|
LL + Some(Some(2)) => ..,
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:46:20
|
|
|
|
|
|
|
|
|
LL | Some(x) if Some(2) == x => ..,
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(x) if Some(2) == x => ..,
|
|
|
|
LL + Some(Some(2)) => ..,
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
|
|
|
--> $DIR/redundant_guards.rs:71:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | B { e } if matches!(e, Some(A(2))) => ..,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - B { e } if matches!(e, Some(A(2))) => ..,
|
|
|
|
LL + B { e: Some(A(2)) } => ..,
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:108:20
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | E::A(y) if y == "not from an or pattern" => {},
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - E::A(y) if y == "not from an or pattern" => {},
|
|
|
|
LL + E::A("not from an or pattern") => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:115:14
|
2023-07-31 21:53:53 +00:00
|
|
|
|
|
|
|
|
LL | x if matches!(x, Some(0)) => ..,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - x if matches!(x, Some(0)) => ..,
|
|
|
|
LL + Some(0) => ..,
|
|
|
|
|
|
|
|
|
|
2023-09-13 03:13:51 +00:00
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:165:28
|
2023-09-13 03:13:51 +00:00
|
|
|
|
|
|
|
|
LL | Some(ref x) if x == &1 => {},
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(ref x) if x == &1 => {},
|
|
|
|
LL + Some(1) => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:166:28
|
|
|
|
|
|
|
|
|
LL | Some(ref x) if &1 == x => {},
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(ref x) if &1 == x => {},
|
|
|
|
LL + Some(1) => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
|
|
|
--> $DIR/redundant_guards.rs:167:28
|
2023-09-13 03:13:51 +00:00
|
|
|
|
|
|
|
|
LL | Some(ref x) if let &2 = x => {},
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(ref x) if let &2 = x => {},
|
|
|
|
LL + Some(2) => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:168:28
|
2023-09-13 03:13:51 +00:00
|
|
|
|
|
|
|
|
LL | Some(ref x) if matches!(x, &3) => {},
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - Some(ref x) if matches!(x, &3) => {},
|
|
|
|
LL + Some(3) => {},
|
|
|
|
|
|
|
|
|
|
2023-09-14 06:57:05 +00:00
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:188:32
|
2023-09-14 06:57:05 +00:00
|
|
|
|
|
|
|
|
LL | B { ref c, .. } if c == &1 => {},
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - B { ref c, .. } if c == &1 => {},
|
|
|
|
LL + B { c: 1, .. } => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:189:32
|
|
|
|
|
|
|
|
|
LL | B { ref c, .. } if &1 == c => {},
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - B { ref c, .. } if &1 == c => {},
|
|
|
|
LL + B { c: 1, .. } => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
|
|
|
--> $DIR/redundant_guards.rs:190:32
|
2023-09-14 06:57:05 +00:00
|
|
|
|
|
|
|
|
LL | B { ref c, .. } if let &1 = c => {},
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - B { ref c, .. } if let &1 = c => {},
|
|
|
|
LL + B { c: 1, .. } => {},
|
|
|
|
|
|
|
|
|
|
|
|
|
error: redundant guard
|
2023-09-17 13:34:32 +00:00
|
|
|
--> $DIR/redundant_guards.rs:191:32
|
2023-09-14 06:57:05 +00:00
|
|
|
|
|
|
|
|
LL | B { ref c, .. } if matches!(c, &1) => {},
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL - B { ref c, .. } if matches!(c, &1) => {},
|
|
|
|
LL + B { c: 1, .. } => {},
|
|
|
|
|
|
|
|
|
|
2023-09-17 13:34:32 +00:00
|
|
|
error: aborting due to 17 previous errors
|
2023-07-31 21:53:53 +00:00
|
|
|
|