1 error: redundant pattern matching, consider using `is_none()`
2 --> $DIR/redundant_pattern_matching_option.rs:13:12
4 LL | if let None = None::<()> {}
5 | -------^^^^------------- help: try this: `if None::<()>.is_none()`
7 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
9 error: redundant pattern matching, consider using `is_some()`
10 --> $DIR/redundant_pattern_matching_option.rs:15:12
12 LL | if let Some(_) = Some(42) {}
13 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
15 error: redundant pattern matching, consider using `is_some()`
16 --> $DIR/redundant_pattern_matching_option.rs:17:12
18 LL | if let Some(_) = Some(42) {
19 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
21 error: redundant pattern matching, consider using `is_some()`
22 --> $DIR/redundant_pattern_matching_option.rs:23:15
24 LL | while let Some(_) = Some(42) {}
25 | ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
27 error: redundant pattern matching, consider using `is_none()`
28 --> $DIR/redundant_pattern_matching_option.rs:25:15
30 LL | while let None = Some(42) {}
31 | ----------^^^^----------- help: try this: `while Some(42).is_none()`
33 error: redundant pattern matching, consider using `is_none()`
34 --> $DIR/redundant_pattern_matching_option.rs:27:15
36 LL | while let None = None::<()> {}
37 | ----------^^^^------------- help: try this: `while None::<()>.is_none()`
39 error: redundant pattern matching, consider using `is_some()`
40 --> $DIR/redundant_pattern_matching_option.rs:30:15
42 LL | while let Some(_) = v.pop() {
43 | ----------^^^^^^^---------- help: try this: `while v.pop().is_some()`
45 error: redundant pattern matching, consider using `is_some()`
46 --> $DIR/redundant_pattern_matching_option.rs:38:5
48 LL | / match Some(42) {
49 LL | | Some(_) => true,
52 | |_____^ help: try this: `Some(42).is_some()`
54 error: redundant pattern matching, consider using `is_none()`
55 --> $DIR/redundant_pattern_matching_option.rs:43:5
57 LL | / match None::<()> {
58 LL | | Some(_) => false,
61 | |_____^ help: try this: `None::<()>.is_none()`
63 error: redundant pattern matching, consider using `is_none()`
64 --> $DIR/redundant_pattern_matching_option.rs:48:13
66 LL | let _ = match None::<()> {
68 LL | | Some(_) => false,
71 | |_____^ help: try this: `None::<()>.is_none()`
73 error: redundant pattern matching, consider using `is_some()`
74 --> $DIR/redundant_pattern_matching_option.rs:54:20
76 LL | let _ = if let Some(_) = opt { true } else { false };
77 | -------^^^^^^^------ help: try this: `if opt.is_some()`
79 error: redundant pattern matching, consider using `is_some()`
80 --> $DIR/redundant_pattern_matching_option.rs:58:20
82 LL | let _ = if let Some(_) = gen_opt() {
83 | -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
85 error: redundant pattern matching, consider using `is_none()`
86 --> $DIR/redundant_pattern_matching_option.rs:60:19
88 LL | } else if let None = gen_opt() {
89 | -------^^^^------------ help: try this: `if gen_opt().is_none()`
91 error: redundant pattern matching, consider using `is_some()`
92 --> $DIR/redundant_pattern_matching_option.rs:79:12
94 LL | if let Some(_) = Some(42) {}
95 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
97 error: redundant pattern matching, consider using `is_none()`
98 --> $DIR/redundant_pattern_matching_option.rs:81:12
100 LL | if let None = None::<()> {}
101 | -------^^^^------------- help: try this: `if None::<()>.is_none()`
103 error: redundant pattern matching, consider using `is_some()`
104 --> $DIR/redundant_pattern_matching_option.rs:83:15
106 LL | while let Some(_) = Some(42) {}
107 | ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
109 error: redundant pattern matching, consider using `is_none()`
110 --> $DIR/redundant_pattern_matching_option.rs:85:15
112 LL | while let None = None::<()> {}
113 | ----------^^^^------------- help: try this: `while None::<()>.is_none()`
115 error: redundant pattern matching, consider using `is_some()`
116 --> $DIR/redundant_pattern_matching_option.rs:87:5
118 LL | / match Some(42) {
119 LL | | Some(_) => true,
120 LL | | None => false,
122 | |_____^ help: try this: `Some(42).is_some()`
124 error: redundant pattern matching, consider using `is_none()`
125 --> $DIR/redundant_pattern_matching_option.rs:92:5
127 LL | / match None::<()> {
128 LL | | Some(_) => false,
131 | |_____^ help: try this: `None::<()>.is_none()`
133 error: aborting due to 19 previous errors