3 #![warn(clippy::match_like_matches_macro)]
4 #![allow(unreachable_patterns, dead_code, clippy::equatable_if_let)]
29 Some(r) if r == 0 => false,
34 let _zzz = if let Some(5) = x { true } else { false };
66 // skip rustfmt to prevent removing block for first pattern
105 E::A(a) if a < 10 => false,
106 E::B(a) if a < 10 => false,
114 E::B(a) if a < 10 => false,
136 // should print "z" in suggestion (#6503)
145 // this could also print "z" in suggestion..?
159 fn foo(_x: AnEnum) {}
163 // we can't remove the reference here!
175 fn fun(_val: Option<S>) {}
176 let val = Some(S(42));
177 // we need the reference here because later val is consumed by fun()
178 let _res = match &val {
179 &Some(ref _a) => true,
188 fn fun(_val: Option<S>) {}
189 let val = Some(S(42));
190 let _res = match &val {
191 &Some(ref _a) => true,
206 #[cfg(feature = "foo")]
213 // ignore if match block contains comment
214 let _line_comments = match x {
216 '1' | '2' | '3' => true,
217 // spaces are very important to be true.
224 let _block_comments = match x {
227 '1' | '2' | '3' => true,
228 /* spaces are very important to be true.