@@ -89,31 +89,37 @@ LL | } else if let None = gen_opt() {
89
89
| -------^^^^------------ help: try this: `if gen_opt().is_none()`
90
90
91
91
error: redundant pattern matching, consider using `is_some()`
92
- --> $DIR/redundant_pattern_matching_option.rs:80:12
92
+ --> $DIR/redundant_pattern_matching_option.rs:67:12
93
+ |
94
+ LL | if let Some(..) = gen_opt() {}
95
+ | -------^^^^^^^^------------ help: try this: `if gen_opt().is_some()`
96
+
97
+ error: redundant pattern matching, consider using `is_some()`
98
+ --> $DIR/redundant_pattern_matching_option.rs:82:12
93
99
|
94
100
LL | if let Some(_) = Some(42) {}
95
101
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
96
102
97
103
error: redundant pattern matching, consider using `is_none()`
98
- --> $DIR/redundant_pattern_matching_option.rs:82 :12
104
+ --> $DIR/redundant_pattern_matching_option.rs:84 :12
99
105
|
100
106
LL | if let None = None::<()> {}
101
107
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
102
108
103
109
error: redundant pattern matching, consider using `is_some()`
104
- --> $DIR/redundant_pattern_matching_option.rs:84 :15
110
+ --> $DIR/redundant_pattern_matching_option.rs:86 :15
105
111
|
106
112
LL | while let Some(_) = Some(42) {}
107
113
| ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
108
114
109
115
error: redundant pattern matching, consider using `is_none()`
110
- --> $DIR/redundant_pattern_matching_option.rs:86 :15
116
+ --> $DIR/redundant_pattern_matching_option.rs:88 :15
111
117
|
112
118
LL | while let None = None::<()> {}
113
119
| ----------^^^^------------- help: try this: `while None::<()>.is_none()`
114
120
115
121
error: redundant pattern matching, consider using `is_some()`
116
- --> $DIR/redundant_pattern_matching_option.rs:88 :5
122
+ --> $DIR/redundant_pattern_matching_option.rs:90 :5
117
123
|
118
124
LL | / match Some(42) {
119
125
LL | | Some(_) => true,
@@ -122,7 +128,7 @@ LL | | };
122
128
| |_____^ help: try this: `Some(42).is_some()`
123
129
124
130
error: redundant pattern matching, consider using `is_none()`
125
- --> $DIR/redundant_pattern_matching_option.rs:93 :5
131
+ --> $DIR/redundant_pattern_matching_option.rs:95 :5
126
132
|
127
133
LL | / match None::<()> {
128
134
LL | | Some(_) => false,
@@ -131,16 +137,16 @@ LL | | };
131
137
| |_____^ help: try this: `None::<()>.is_none()`
132
138
133
139
error: redundant pattern matching, consider using `is_none()`
134
- --> $DIR/redundant_pattern_matching_option.rs:101 :12
140
+ --> $DIR/redundant_pattern_matching_option.rs:103 :12
135
141
|
136
142
LL | if let None = *(&None::<()>) {}
137
143
| -------^^^^----------------- help: try this: `if (&None::<()>).is_none()`
138
144
139
145
error: redundant pattern matching, consider using `is_none()`
140
- --> $DIR/redundant_pattern_matching_option.rs:102 :12
146
+ --> $DIR/redundant_pattern_matching_option.rs:104 :12
141
147
|
142
148
LL | if let None = *&None::<()> {}
143
149
| -------^^^^--------------- help: try this: `if (&None::<()>).is_none()`
144
150
145
- error: aborting due to 21 previous errors
151
+ error: aborting due to 22 previous errors
146
152
0 commit comments