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 27 | | ExprNode::ExprAddrOf => Some(&NODE),
6 28 | | _ => { let x = 5; None },
8 | |_____^ help: try this: `if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else { let x = 5; None }`
10 = note: `-D single-match-else` implied by `-D warnings`
12 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
13 --> $DIR/matches.rs:35:5
16 36 | | Some(y) => { println!("{:?}", y); }
19 | |_____^ help: try this: `if let Some(y) = x { println!("{:?}", y); }`
21 = note: `-D single-match` implied by `-D warnings`
23 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
24 --> $DIR/matches.rs:41:5
27 42 | | (2...3, 7...9) => dummy(),
30 | |_____^ help: try this: `if let (2...3, 7...9) = z { dummy() }`
32 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
33 --> $DIR/matches.rs:63:5
36 64 | | Some(y) => dummy(),
39 | |_____^ help: try this: `if let Some(y) = x { dummy() }`
41 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
42 --> $DIR/matches.rs:68:5
45 69 | | Ok(y) => dummy(),
48 | |_____^ help: try this: `if let Ok(y) = y { dummy() }`
50 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
51 --> $DIR/matches.rs:75:5
54 76 | | Cow::Borrowed(..) => dummy(),
55 77 | | Cow::Owned(..) => (),
57 | |_____^ help: try this: `if let Cow::Borrowed(..) = c { dummy() }`
59 error: you seem to be trying to match on a boolean expression
60 --> $DIR/matches.rs:96:5
66 | |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
68 = note: `-D match-bool` implied by `-D warnings`
70 error: you seem to be trying to match on a boolean expression
71 --> $DIR/matches.rs:102:5
73 102 | / match option == 1 {
77 | |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
79 error: you seem to be trying to match on a boolean expression
80 --> $DIR/matches.rs:107:5
84 109 | | false => { println!("Noooo!"); }
86 | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
88 error: you seem to be trying to match on a boolean expression
89 --> $DIR/matches.rs:112:5
92 113 | | false => { println!("Noooo!"); }
95 | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
97 error: you seem to be trying to match on a boolean expression
98 --> $DIR/matches.rs:117:5
100 117 | / match test && test {
101 118 | | false => { println!("Noooo!"); }
104 | |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
106 error: equal expressions as operands to `&&`
107 --> $DIR/matches.rs:117:11
109 117 | match test && test {
112 = note: `-D eq-op` implied by `-D warnings`
114 error: you seem to be trying to match on a boolean expression
115 --> $DIR/matches.rs:122:5
118 123 | | false => { println!("Noooo!"); }
119 124 | | true => { println!("Yes!"); }
121 | |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
123 error: you don't need to add `&` to all patterns
124 --> $DIR/matches.rs:138:9
127 139 | | &Some(v) => println!("{:?}", v),
128 140 | | &None => println!("none"),
132 = note: `-D match-ref-pats` implied by `-D warnings`
133 help: instead of prefixing all patterns with `&`, you can dereference the expression
135 138 | match *v { .. }
138 error: you don't need to add `&` to all patterns
139 --> $DIR/matches.rs:148:5
142 149 | | &(v, 1) => println!("{}", v),
143 150 | | _ => println!("none"),
147 help: instead of prefixing all patterns with `&`, you can dereference the expression
149 148 | match *tup { .. }
152 error: you don't need to add `&` to both the expression and the patterns
153 --> $DIR/matches.rs:154:5
156 155 | | &Some(v) => println!("{:?}", v),
157 156 | | &None => println!("none"),
159 | |_____^ help: try: `match w { .. }`
161 error: you don't need to add `&` to all patterns
162 --> $DIR/matches.rs:165:5
164 165 | / if let &None = a {
165 166 | | println!("none");
169 help: instead of prefixing all patterns with `&`, you can dereference the expression
171 165 | if let .. = *a { .. }
174 error: you don't need to add `&` to both the expression and the patterns
175 --> $DIR/matches.rs:170:5
177 170 | / if let &None = &b {
178 171 | | println!("none");
180 | |_____^ help: try: `if let .. = b { .. }`
182 error: some ranges overlap
183 --> $DIR/matches.rs:179:9
185 179 | 0 ... 10 => println!("0 ... 10"),
188 = note: `-D match-overlapping-arm` implied by `-D warnings`
189 note: overlaps with this
190 --> $DIR/matches.rs:180:9
192 180 | 0 ... 11 => println!("0 ... 11"),
195 error: some ranges overlap
196 --> $DIR/matches.rs:185:9
198 185 | 0 ... 5 => println!("0 ... 5"),
201 note: overlaps with this
202 --> $DIR/matches.rs:187:9
204 187 | FOO ... 11 => println!("0 ... 11"),
207 error: some ranges overlap
208 --> $DIR/matches.rs:193:9
210 193 | 0 ... 5 => println!("0 ... 5"),
213 note: overlaps with this
214 --> $DIR/matches.rs:192:9
216 192 | 2 => println!("2"),
219 error: some ranges overlap
220 --> $DIR/matches.rs:199:9
222 199 | 0 ... 2 => println!("0 ... 2"),
225 note: overlaps with this
226 --> $DIR/matches.rs:198:9
228 198 | 2 => println!("2"),
231 error: some ranges overlap
232 --> $DIR/matches.rs:222:9
234 222 | 0 .. 11 => println!("0 .. 11"),
237 note: overlaps with this
238 --> $DIR/matches.rs:223:9
240 223 | 0 ... 11 => println!("0 ... 11"),
243 error: Err(_) will match all errors, maybe not a good idea
244 --> $DIR/matches.rs:240:9
246 240 | Err(_) => panic!("err")
249 = note: `-D match-wild-err-arm` implied by `-D warnings`
250 = note: to remove this warning, match each error seperately or use unreachable macro
252 error: this `match` has identical arm bodies
253 --> $DIR/matches.rs:239:18
255 239 | Ok(_) => println!("ok"),
258 = note: `-D match-same-arms` implied by `-D warnings`
260 --> $DIR/matches.rs:238:18
262 238 | Ok(3) => println!("ok"),
264 note: consider refactoring into `Ok(3) | Ok(_)`
265 --> $DIR/matches.rs:238:18
267 238 | Ok(3) => println!("ok"),
269 = note: this error originates in a macro outside of the current crate
271 error: Err(_) will match all errors, maybe not a good idea
272 --> $DIR/matches.rs:246:9
274 246 | Err(_) => {panic!()}
277 = note: to remove this warning, match each error seperately or use unreachable macro
279 error: this `match` has identical arm bodies
280 --> $DIR/matches.rs:245:18
282 245 | Ok(_) => println!("ok"),
286 --> $DIR/matches.rs:244:18
288 244 | Ok(3) => println!("ok"),
290 note: consider refactoring into `Ok(3) | Ok(_)`
291 --> $DIR/matches.rs:244:18
293 244 | Ok(3) => println!("ok"),
295 = note: this error originates in a macro outside of the current crate
297 error: Err(_) will match all errors, maybe not a good idea
298 --> $DIR/matches.rs:252:9
300 252 | Err(_) => {panic!();}
303 = note: to remove this warning, match each error seperately or use unreachable macro
305 error: this `match` has identical arm bodies
306 --> $DIR/matches.rs:251:18
308 251 | Ok(_) => println!("ok"),
312 --> $DIR/matches.rs:250:18
314 250 | Ok(3) => println!("ok"),
316 note: consider refactoring into `Ok(3) | Ok(_)`
317 --> $DIR/matches.rs:250:18
319 250 | Ok(3) => println!("ok"),
321 = note: this error originates in a macro outside of the current crate
323 error: this `match` has identical arm bodies
324 --> $DIR/matches.rs:258:18
326 258 | Ok(_) => println!("ok"),
330 --> $DIR/matches.rs:257:18
332 257 | Ok(3) => println!("ok"),
334 note: consider refactoring into `Ok(3) | Ok(_)`
335 --> $DIR/matches.rs:257:18
337 257 | Ok(3) => println!("ok"),
339 = note: this error originates in a macro outside of the current crate
341 error: this `match` has identical arm bodies
342 --> $DIR/matches.rs:265:18
344 265 | Ok(_) => println!("ok"),
348 --> $DIR/matches.rs:264:18
350 264 | Ok(3) => println!("ok"),
352 note: consider refactoring into `Ok(3) | Ok(_)`
353 --> $DIR/matches.rs:264:18
355 264 | Ok(3) => println!("ok"),
357 = note: this error originates in a macro outside of the current crate
359 error: this `match` has identical arm bodies
360 --> $DIR/matches.rs:271:18
362 271 | Ok(_) => println!("ok"),
366 --> $DIR/matches.rs:270:18
368 270 | Ok(3) => println!("ok"),
370 note: consider refactoring into `Ok(3) | Ok(_)`
371 --> $DIR/matches.rs:270:18
373 270 | Ok(3) => println!("ok"),
375 = note: this error originates in a macro outside of the current crate
377 error: this `match` has identical arm bodies
378 --> $DIR/matches.rs:277:18
380 277 | Ok(_) => println!("ok"),
384 --> $DIR/matches.rs:276:18
386 276 | Ok(3) => println!("ok"),
388 note: consider refactoring into `Ok(3) | Ok(_)`
389 --> $DIR/matches.rs:276:18
391 276 | Ok(3) => println!("ok"),
393 = note: this error originates in a macro outside of the current crate