3 #![warn(clippy::manual_filter)]
4 #![allow(unused_variables, dead_code)]
86 let external_cond = true;
87 match Some(String::new()) {
98 if let Some(x) = Some(7) {
99 if external_cond { Some(x) } else { None }
117 if x > 10 && x < 100 {
127 // Don't lint, `.filter` is not const
130 if x > 10 && x < 100 {
140 #[allow(clippy::blocks_in_if_conditions)]
142 // Lint, statement is preserved by `.filter`
157 // Don't Lint, statement is lost by `.filter`
159 if x > 10 && x < 100 {
170 // Don't Lint, because of `None => Some(1)`
172 if x > 10 && x < 100 {
182 unsafe fn f(x: u32) -> bool {
185 let _ = match Some(14) {
195 let _ = match Some(15) {
197 if f(x) { Some(x) } else { None }
202 #[allow(clippy::redundant_pattern_matching)]
203 if let Some(_) = Some(16) {
205 } else if let Some(x) = Some(16) {
206 // Lint starting from here
207 if x % 2 == 0 { Some(x) } else { None }
212 match Some((17, 17)) {
213 // Not linted for now could be
229 match Some(NamedTuple {
230 // Not linted for now could be
234 Some(NamedTuple { x, y }) => {
236 Some(NamedTuple { x, y })