2020-12-06 15:01:03 +01:00
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:15:12
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | if let Pending = Pending::<()> {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^---------------- help: try: `if Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
2023-08-01 14:02:21 +02:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_pattern_matching)]`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:18:12
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | if let Ready(_) = Ready(42) {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^^------------ help: try: `if Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:21:12
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | if let Ready(_) = Ready(42) {
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^^------------ help: try: `if Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:29:8
|
2023-12-27 18:53:48 +01:00
|
|
|
|
|
|
|
|
|
LL | if matches!(Ready(42), Ready(_)) {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ready(42).is_ready()`
|
|
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:33:8
|
2023-12-27 18:53:48 +01:00
|
|
|
|
|
|
|
|
|
LL | if matches!(Pending::<()>, Pending) {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Pending::<()>.is_pending()`
|
|
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:36:15
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | while let Ready(_) = Ready(42) {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| ----------^^^^^^^^------------ help: try: `while Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:39:15
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | while let Pending = Ready(42) {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| ----------^^^^^^^------------ help: try: `while Ready(42).is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:42:15
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | while let Pending = Pending::<()> {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| ----------^^^^^^^---------------- help: try: `while Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:49:5
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | / match Ready(42) {
|
2025-02-11 17:57:08 +01:00
|
|
|
LL | |
|
2020-12-06 15:01:03 +01:00
|
|
|
LL | | Ready(_) => true,
|
|
|
|
|
LL | | Pending => false,
|
|
|
|
|
LL | | };
|
2023-07-17 10:19:29 +02:00
|
|
|
| |_____^ help: try: `Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:55:5
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | / match Pending::<()> {
|
2025-02-11 17:57:08 +01:00
|
|
|
LL | |
|
2020-12-06 15:01:03 +01:00
|
|
|
LL | | Ready(_) => false,
|
|
|
|
|
LL | | Pending => true,
|
|
|
|
|
LL | | };
|
2023-07-17 10:19:29 +02:00
|
|
|
| |_____^ help: try: `Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:61:13
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | let _ = match Pending::<()> {
|
|
|
|
|
| _____________^
|
2025-02-11 17:57:08 +01:00
|
|
|
LL | |
|
2020-12-06 15:01:03 +01:00
|
|
|
LL | | Ready(_) => false,
|
|
|
|
|
LL | | Pending => true,
|
|
|
|
|
LL | | };
|
2023-07-17 10:19:29 +02:00
|
|
|
| |_____^ help: try: `Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:68:20
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | let _ = if let Ready(_) = poll { true } else { false };
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^^------- help: try: `if poll.is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:73:20
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | let _ = if let Ready(_) = gen_poll() {
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^^------------- help: try: `if gen_poll().is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:76:19
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | } else if let Pending = gen_poll() {
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^------------- help: try: `if gen_poll().is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:93:12
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | if let Ready(_) = Ready(42) {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^^------------ help: try: `if Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:96:12
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | if let Pending = Pending::<()> {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| -------^^^^^^^---------------- help: try: `if Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:99:15
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | while let Ready(_) = Ready(42) {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| ----------^^^^^^^^------------ help: try: `while Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:102:15
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | while let Pending = Pending::<()> {}
|
2023-07-17 10:19:29 +02:00
|
|
|
| ----------^^^^^^^---------------- help: try: `while Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ready()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:105:5
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | / match Ready(42) {
|
2025-02-11 17:57:08 +01:00
|
|
|
LL | |
|
2020-12-06 15:01:03 +01:00
|
|
|
LL | | Ready(_) => true,
|
|
|
|
|
LL | | Pending => false,
|
|
|
|
|
LL | | };
|
2023-07-17 10:19:29 +02:00
|
|
|
| |_____^ help: try: `Ready(42).is_ready()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_pending()`
|
2025-02-11 17:57:08 +01:00
|
|
|
--> tests/ui/redundant_pattern_matching_poll.rs:111:5
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
|
LL | / match Pending::<()> {
|
2025-02-11 17:57:08 +01:00
|
|
|
LL | |
|
2020-12-06 15:01:03 +01:00
|
|
|
LL | | Ready(_) => false,
|
|
|
|
|
LL | | Pending => true,
|
|
|
|
|
LL | | };
|
2023-07-17 10:19:29 +02:00
|
|
|
| |_____^ help: try: `Pending::<()>.is_pending()`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
2023-12-27 18:53:48 +01:00
|
|
|
error: aborting due to 20 previous errors
|
2020-12-06 15:01:03 +01:00
|
|
|
|