2023-12-16 10:40:32 -06:00
|
|
|
error: using `if let` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:22:8
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | if let true = k > 1 {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: consider using the condition directly: `k > 1`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_pattern_matching)]`
|
|
|
|
|
|
|
|
error: using `if let` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:23:8
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | if let false = k > 5 {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: consider using the condition directly: `!(k > 5)`
|
|
|
|
|
|
|
|
error: using `if let` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:24:8
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | if let (true) = k > 1 {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: consider using the condition directly: `k > 1`
|
|
|
|
|
|
|
|
error: using `if let` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:26:11
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | while let true = k > 1 {
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: consider using the condition directly: `k > 1`
|
|
|
|
|
|
|
|
error: using `if let` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:29:11
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | while let true = condition!() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using the condition directly: `condition!()`
|
|
|
|
|
|
|
|
error: using `matches!` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:33:5
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | matches!(k > 5, true);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using the condition directly: `k > 5`
|
|
|
|
|
|
|
|
error: using `matches!` to pattern match a bool
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/redundant_pattern_matching_if_let_true.rs:34:5
|
2023-12-16 10:40:32 -06:00
|
|
|
|
|
|
|
|
LL | matches!(k > 5, false);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using the condition directly: `!(k > 5)`
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|