1 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
2 --> $DIR/matches.rs:26:5
4 26 | match ExprNode::Butterflies {
5 | _____^ starting here...
9 30 | | ExprNode::ExprAddrOf => Some(&NODE),
10 31 | | _ => { let x = 5; None },
12 | |_____^ ...ending here
14 note: lint level defined here
15 --> $DIR/matches.rs:7:9
17 7 | #![deny(single_match_else)]
20 | if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { let x = 5; None }
22 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
23 --> $DIR/matches.rs:38:5
26 | _____^ starting here...
30 42 | | Some(y) => { println!("{:?}", y); }
33 | |_____^ ...ending here
35 = note: #[deny(single_match)] implied by #[deny(clippy)]
36 note: lint level defined here
37 --> $DIR/matches.rs:5:9
42 | if let Some(y) = x { println!("{:?}", y); };
44 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
45 --> $DIR/matches.rs:47:5
48 | _____^ starting here...
52 51 | | (2...3, 7...9) => dummy(),
55 | |_____^ ...ending here
57 = note: #[deny(single_match)] implied by #[deny(clippy)]
59 | if let (2...3, 7...9) = z { dummy() };
61 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
62 --> $DIR/matches.rs:72:5
65 | _____^ starting here...
69 76 | | Some(y) => dummy(),
72 | |_____^ ...ending here
74 = note: #[deny(single_match)] implied by #[deny(clippy)]
76 | if let Some(y) = x { dummy() };
78 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
79 --> $DIR/matches.rs:80:5
82 | _____^ starting here...
86 84 | | Ok(y) => dummy(),
89 | |_____^ ...ending here
91 = note: #[deny(single_match)] implied by #[deny(clippy)]
93 | if let Ok(y) = y { dummy() };
95 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
96 --> $DIR/matches.rs:90:5
99 | _____^ starting here...
103 94 | | Cow::Borrowed(..) => dummy(),
104 95 | | Cow::Owned(..) => (),
106 | |_____^ ...ending here
108 = note: #[deny(single_match)] implied by #[deny(clippy)]
110 | if let Cow::Borrowed(..) = c { dummy() };
112 error: you seem to be trying to match on a boolean expression
113 --> $DIR/matches.rs:114:5
116 | _____^ starting here...
123 | |_____^ ...ending here
125 = note: #[deny(match_bool)] implied by #[deny(clippy)]
126 note: lint level defined here
127 --> $DIR/matches.rs:5:9
131 help: consider using an if/else expression
132 | if test { 0 } else { 42 };
134 error: you seem to be trying to match on a boolean expression
135 --> $DIR/matches.rs:123:5
137 123 | match option == 1 {
138 | _____^ starting here...
145 | |_____^ ...ending here
147 = note: #[deny(match_bool)] implied by #[deny(clippy)]
148 help: consider using an if/else expression
149 | if option == 1 { 1 } else { 0 };
151 error: you seem to be trying to match on a boolean expression
152 --> $DIR/matches.rs:131:5
155 | _____^ starting here...
160 136 | | false => { println!("Noooo!"); }
162 | |_____^ ...ending here
164 = note: #[deny(match_bool)] implied by #[deny(clippy)]
165 help: consider using an if/else expression
166 | if !test { println!("Noooo!"); };
168 error: you seem to be trying to match on a boolean expression
169 --> $DIR/matches.rs:139:5
172 | _____^ starting here...
176 143 | | false => { println!("Noooo!"); }
179 | |_____^ ...ending here
181 = note: #[deny(match_bool)] implied by #[deny(clippy)]
182 help: consider using an if/else expression
183 | if !test { println!("Noooo!"); };
185 error: you seem to be trying to match on a boolean expression
186 --> $DIR/matches.rs:147:5
188 147 | match test && test {
189 | _____^ starting here...
194 152 | | false => { println!("Noooo!"); }
197 | |_____^ ...ending here
199 = note: #[deny(match_bool)] implied by #[deny(clippy)]
200 help: consider using an if/else expression
201 | if !(test && test) { println!("Noooo!"); };
203 error: equal expressions as operands to `&&`
204 --> $DIR/matches.rs:147:11
206 147 | match test && test {
209 = note: #[deny(eq_op)] implied by #[deny(clippy)]
210 note: lint level defined here
211 --> $DIR/matches.rs:5:9
216 error: you seem to be trying to match on a boolean expression
217 --> $DIR/matches.rs:156:5
220 | _____^ starting here...
224 160 | | false => { println!("Noooo!"); }
225 161 | | true => { println!("Yes!"); }
227 | |_____^ ...ending here
229 = note: #[deny(match_bool)] implied by #[deny(clippy)]
230 help: consider using an if/else expression
231 | if test { println!("Yes!"); } else { println!("Noooo!"); };
233 error: you don't need to add `&` to all patterns
234 --> $DIR/matches.rs:175:9
237 | _________^ starting here...
241 179 | | &Some(v) => println!("{:?}", v),
242 180 | | &None => println!("none"),
244 | |_________^ ...ending here
246 = note: #[deny(match_ref_pats)] implied by #[deny(clippy)]
247 note: lint level defined here
248 --> $DIR/matches.rs:5:9
252 help: instead of prefixing all patterns with `&`, you can dereference the expression
255 error: you don't need to add `&` to all patterns
256 --> $DIR/matches.rs:188:5
259 | _____^ starting here...
263 192 | | &(v, 1) => println!("{}", v),
264 193 | | _ => println!("none"),
266 | |_____^ ...ending here
268 = note: #[deny(match_ref_pats)] implied by #[deny(clippy)]
269 help: instead of prefixing all patterns with `&`, you can dereference the expression
272 error: you don't need to add `&` to both the expression and the patterns
273 --> $DIR/matches.rs:197:5
276 | _____^ starting here...
280 201 | | &Some(v) => println!("{:?}", v),
281 202 | | &None => println!("none"),
283 | |_____^ ...ending here
285 = note: #[deny(match_ref_pats)] implied by #[deny(clippy)]
289 error: you don't need to add `&` to all patterns
290 --> $DIR/matches.rs:211:5
292 211 | if let &None = a {
293 | _____^ starting here...
297 215 | | println!("none");
299 | |_____^ ...ending here
301 = note: #[deny(match_ref_pats)] implied by #[deny(clippy)]
302 help: instead of prefixing all patterns with `&`, you can dereference the expression
303 | if let .. = *a { .. }
305 error: you don't need to add `&` to both the expression and the patterns
306 --> $DIR/matches.rs:219:5
308 219 | if let &None = &b {
309 | _____^ starting here...
313 223 | | println!("none");
315 | |_____^ ...ending here
317 = note: #[deny(match_ref_pats)] implied by #[deny(clippy)]
319 | if let .. = b { .. }
321 error: some ranges overlap
322 --> $DIR/matches.rs:231:9
324 231 | 0 ... 10 => println!("0 ... 10"),
327 = note: #[deny(match_overlapping_arm)] implied by #[deny(clippy)]
328 note: lint level defined here
329 --> $DIR/matches.rs:5:9
333 note: overlaps with this
334 --> $DIR/matches.rs:232:9
336 232 | 0 ... 11 => println!("0 ... 11"),
339 error: some ranges overlap
340 --> $DIR/matches.rs:237:9
342 237 | 0 ... 5 => println!("0 ... 5"),
345 = note: #[deny(match_overlapping_arm)] implied by #[deny(clippy)]
346 note: overlaps with this
347 --> $DIR/matches.rs:239:9
349 239 | FOO ... 11 => println!("0 ... 11"),
352 error: some ranges overlap
353 --> $DIR/matches.rs:245:9
355 245 | 0 ... 5 => println!("0 ... 5"),
358 = note: #[deny(match_overlapping_arm)] implied by #[deny(clippy)]
359 note: overlaps with this
360 --> $DIR/matches.rs:244:9
362 244 | 2 => println!("2"),
365 error: some ranges overlap
366 --> $DIR/matches.rs:251:9
368 251 | 0 ... 2 => println!("0 ... 2"),
371 = note: #[deny(match_overlapping_arm)] implied by #[deny(clippy)]
372 note: overlaps with this
373 --> $DIR/matches.rs:250:9
375 250 | 2 => println!("2"),
378 error: some ranges overlap
379 --> $DIR/matches.rs:274:9
381 274 | 0 .. 11 => println!("0 .. 11"),
384 = note: #[deny(match_overlapping_arm)] implied by #[deny(clippy)]
385 note: overlaps with this
386 --> $DIR/matches.rs:275:9
388 275 | 0 ... 11 => println!("0 ... 11"),
391 error: aborting due to 23 previous errors