@@ -77,49 +77,49 @@ LL | let _ = if let Some(_) = opt { true } else { false };
7777 | -------^^^^^^^------ help: try this: `if opt.is_some()`
7878
7979error: redundant pattern matching, consider using `is_some()`
80- --> $DIR/redundant_pattern_matching_option.rs:60 :20
80+ --> $DIR/redundant_pattern_matching_option.rs:61 :20
8181 |
8282LL | let _ = if let Some(_) = gen_opt() {
8383 | -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
8484
8585error: redundant pattern matching, consider using `is_none()`
86- --> $DIR/redundant_pattern_matching_option.rs:62 :19
86+ --> $DIR/redundant_pattern_matching_option.rs:63 :19
8787 |
8888LL | } else if let None = gen_opt() {
8989 | -------^^^^------------ help: try this: `if gen_opt().is_none()`
9090
9191error: redundant pattern matching, consider using `is_some()`
92- --> $DIR/redundant_pattern_matching_option.rs:68 :12
92+ --> $DIR/redundant_pattern_matching_option.rs:69 :12
9393 |
9494LL | if let Some(..) = gen_opt() {}
9595 | -------^^^^^^^^------------ help: try this: `if gen_opt().is_some()`
9696
9797error: redundant pattern matching, consider using `is_some()`
98- --> $DIR/redundant_pattern_matching_option.rs:83 :12
98+ --> $DIR/redundant_pattern_matching_option.rs:84 :12
9999 |
100100LL | if let Some(_) = Some(42) {}
101101 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
102102
103103error: redundant pattern matching, consider using `is_none()`
104- --> $DIR/redundant_pattern_matching_option.rs:85 :12
104+ --> $DIR/redundant_pattern_matching_option.rs:86 :12
105105 |
106106LL | if let None = None::<()> {}
107107 | -------^^^^------------- help: try this: `if None::<()>.is_none()`
108108
109109error: redundant pattern matching, consider using `is_some()`
110- --> $DIR/redundant_pattern_matching_option.rs:87 :15
110+ --> $DIR/redundant_pattern_matching_option.rs:88 :15
111111 |
112112LL | while let Some(_) = Some(42) {}
113113 | ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
114114
115115error: redundant pattern matching, consider using `is_none()`
116- --> $DIR/redundant_pattern_matching_option.rs:89 :15
116+ --> $DIR/redundant_pattern_matching_option.rs:90 :15
117117 |
118118LL | while let None = None::<()> {}
119119 | ----------^^^^------------- help: try this: `while None::<()>.is_none()`
120120
121121error: redundant pattern matching, consider using `is_some()`
122- --> $DIR/redundant_pattern_matching_option.rs:91 :5
122+ --> $DIR/redundant_pattern_matching_option.rs:92 :5
123123 |
124124LL | / match Some(42) {
125125LL | | Some(_) => true,
@@ -128,7 +128,7 @@ LL | | };
128128 | |_____^ help: try this: `Some(42).is_some()`
129129
130130error: redundant pattern matching, consider using `is_none()`
131- --> $DIR/redundant_pattern_matching_option.rs:96 :5
131+ --> $DIR/redundant_pattern_matching_option.rs:97 :5
132132 |
133133LL | / match None::<()> {
134134LL | | Some(_) => false,
@@ -137,19 +137,19 @@ LL | | };
137137 | |_____^ help: try this: `None::<()>.is_none()`
138138
139139error: redundant pattern matching, consider using `is_none()`
140- --> $DIR/redundant_pattern_matching_option.rs:104 :12
140+ --> $DIR/redundant_pattern_matching_option.rs:105 :12
141141 |
142142LL | if let None = *(&None::<()>) {}
143143 | -------^^^^----------------- help: try this: `if (&None::<()>).is_none()`
144144
145145error: redundant pattern matching, consider using `is_none()`
146- --> $DIR/redundant_pattern_matching_option.rs:105 :12
146+ --> $DIR/redundant_pattern_matching_option.rs:106 :12
147147 |
148148LL | if let None = *&None::<()> {}
149149 | -------^^^^--------------- help: try this: `if (&None::<()>).is_none()`
150150
151151error: redundant pattern matching, consider using `is_some()`
152- --> $DIR/redundant_pattern_matching_option.rs:111 :5
152+ --> $DIR/redundant_pattern_matching_option.rs:112 :5
153153 |
154154LL | / match x {
155155LL | | Some(_) => true,
@@ -158,7 +158,7 @@ LL | | };
158158 | |_____^ help: try this: `x.is_some()`
159159
160160error: redundant pattern matching, consider using `is_none()`
161- --> $DIR/redundant_pattern_matching_option.rs:116 :5
161+ --> $DIR/redundant_pattern_matching_option.rs:117 :5
162162 |
163163LL | / match x {
164164LL | | None => true,
@@ -167,7 +167,7 @@ LL | | };
167167 | |_____^ help: try this: `x.is_none()`
168168
169169error: redundant pattern matching, consider using `is_none()`
170- --> $DIR/redundant_pattern_matching_option.rs:121 :5
170+ --> $DIR/redundant_pattern_matching_option.rs:122 :5
171171 |
172172LL | / match x {
173173LL | | Some(_) => false,
@@ -176,13 +176,25 @@ LL | | };
176176 | |_____^ help: try this: `x.is_none()`
177177
178178error: redundant pattern matching, consider using `is_some()`
179- --> $DIR/redundant_pattern_matching_option.rs:126 :5
179+ --> $DIR/redundant_pattern_matching_option.rs:127 :5
180180 |
181181LL | / match x {
182182LL | | None => false,
183183LL | | _ => true,
184184LL | | };
185185 | |_____^ help: try this: `x.is_some()`
186186
187- error: aborting due to 26 previous errors
187+ error: redundant pattern matching, consider using `is_some()`
188+ --> $DIR/redundant_pattern_matching_option.rs:142:13
189+ |
190+ LL | let _ = matches!(x, Some(_));
191+ | ^^^^^^^^^^^^^^^^^^^^ help: try this: `x.is_some()`
192+
193+ error: redundant pattern matching, consider using `is_none()`
194+ --> $DIR/redundant_pattern_matching_option.rs:144:13
195+ |
196+ LL | let _ = matches!(x, None);
197+ | ^^^^^^^^^^^^^^^^^ help: try this: `x.is_none()`
198+
199+ error: aborting due to 28 previous errors
188200
0 commit comments