summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_pattern_matching_poll.stderr
blob: 1b480f3157f7072dd9be64e1059a22c4f80d1e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:16:12
   |
LL |     if let Pending = Pending::<()> {}
   |     -------^^^^^^^---------------- help: try this: `if Pending::<()>.is_pending()`
   |
   = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:18:12
   |
LL |     if let Ready(_) = Ready(42) {}
   |     -------^^^^^^^^------------ help: try this: `if Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:20:12
   |
LL |     if let Ready(_) = Ready(42) {
   |     -------^^^^^^^^------------ help: try this: `if Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:26:15
   |
LL |     while let Ready(_) = Ready(42) {}
   |     ----------^^^^^^^^------------ help: try this: `while Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:28:15
   |
LL |     while let Pending = Ready(42) {}
   |     ----------^^^^^^^------------ help: try this: `while Ready(42).is_pending()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:30:15
   |
LL |     while let Pending = Pending::<()> {}
   |     ----------^^^^^^^---------------- help: try this: `while Pending::<()>.is_pending()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:36:5
   |
LL | /     match Ready(42) {
LL | |         Ready(_) => true,
LL | |         Pending => false,
LL | |     };
   | |_____^ help: try this: `Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:41:5
   |
LL | /     match Pending::<()> {
LL | |         Ready(_) => false,
LL | |         Pending => true,
LL | |     };
   | |_____^ help: try this: `Pending::<()>.is_pending()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:46:13
   |
LL |       let _ = match Pending::<()> {
   |  _____________^
LL | |         Ready(_) => false,
LL | |         Pending => true,
LL | |     };
   | |_____^ help: try this: `Pending::<()>.is_pending()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:52:20
   |
LL |     let _ = if let Ready(_) = poll { true } else { false };
   |             -------^^^^^^^^------- help: try this: `if poll.is_ready()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:56:20
   |
LL |     let _ = if let Ready(_) = gen_poll() {
   |             -------^^^^^^^^------------- help: try this: `if gen_poll().is_ready()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:58:19
   |
LL |     } else if let Pending = gen_poll() {
   |            -------^^^^^^^------------- help: try this: `if gen_poll().is_pending()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:74:12
   |
LL |     if let Ready(_) = Ready(42) {}
   |     -------^^^^^^^^------------ help: try this: `if Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:76:12
   |
LL |     if let Pending = Pending::<()> {}
   |     -------^^^^^^^---------------- help: try this: `if Pending::<()>.is_pending()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:78:15
   |
LL |     while let Ready(_) = Ready(42) {}
   |     ----------^^^^^^^^------------ help: try this: `while Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:80:15
   |
LL |     while let Pending = Pending::<()> {}
   |     ----------^^^^^^^---------------- help: try this: `while Pending::<()>.is_pending()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_poll.rs:82:5
   |
LL | /     match Ready(42) {
LL | |         Ready(_) => true,
LL | |         Pending => false,
LL | |     };
   | |_____^ help: try this: `Ready(42).is_ready()`

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_poll.rs:87:5
   |
LL | /     match Pending::<()> {
LL | |         Ready(_) => false,
LL | |         Pending => true,
LL | |     };
   | |_____^ help: try this: `Pending::<()>.is_pending()`

error: aborting due to 18 previous errors