]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: `if` chain can be rewritten with `match` |
c620b35d | 2 | --> tests/ui/comparison_chain.rs:14:5 |
f20569fa XL |
3 | | |
4 | LL | / if x > y { | |
781aab86 | 5 | LL | | |
f20569fa XL |
6 | LL | | a() |
7 | LL | | } else if x < y { | |
8 | LL | | b() | |
9 | LL | | } | |
10 | | |_____^ | |
11 | | | |
f20569fa | 12 | = help: consider rewriting the `if` chain to use `cmp` and `match` |
2b03887a | 13 | = note: `-D clippy::comparison-chain` implied by `-D warnings` |
781aab86 | 14 | = help: to override `-D warnings` add `#[allow(clippy::comparison_chain)]` |
f20569fa XL |
15 | |
16 | error: `if` chain can be rewritten with `match` | |
c620b35d | 17 | --> tests/ui/comparison_chain.rs:28:5 |
f20569fa XL |
18 | | |
19 | LL | / if x > y { | |
781aab86 | 20 | LL | | |
f20569fa XL |
21 | LL | | a() |
22 | LL | | } else if x < y { | |
781aab86 | 23 | ... | |
f20569fa XL |
24 | LL | | c() |
25 | LL | | } | |
26 | | |_____^ | |
27 | | | |
28 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
29 | ||
30 | error: `if` chain can be rewritten with `match` | |
c620b35d | 31 | --> tests/ui/comparison_chain.rs:37:5 |
f20569fa XL |
32 | | |
33 | LL | / if x > y { | |
781aab86 | 34 | LL | | |
f20569fa XL |
35 | LL | | a() |
36 | LL | | } else if y > x { | |
781aab86 | 37 | ... | |
f20569fa XL |
38 | LL | | c() |
39 | LL | | } | |
40 | | |_____^ | |
41 | | | |
42 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
43 | ||
44 | error: `if` chain can be rewritten with `match` | |
c620b35d | 45 | --> tests/ui/comparison_chain.rs:46:5 |
f20569fa XL |
46 | | |
47 | LL | / if x > 1 { | |
781aab86 | 48 | LL | | |
f20569fa XL |
49 | LL | | a() |
50 | LL | | } else if x < 1 { | |
781aab86 | 51 | ... | |
f20569fa XL |
52 | LL | | c() |
53 | LL | | } | |
54 | | |_____^ | |
55 | | | |
56 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
57 | ||
58 | error: `if` chain can be rewritten with `match` | |
c620b35d | 59 | --> tests/ui/comparison_chain.rs:121:5 |
f20569fa XL |
60 | | |
61 | LL | / if x > y { | |
781aab86 | 62 | LL | | |
f20569fa XL |
63 | LL | | a() |
64 | LL | | } else if x < y { | |
65 | LL | | b() | |
66 | LL | | } | |
67 | | |_____^ | |
68 | | | |
69 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
70 | ||
71 | error: `if` chain can be rewritten with `match` | |
c620b35d | 72 | --> tests/ui/comparison_chain.rs:128:5 |
f20569fa XL |
73 | | |
74 | LL | / if x > y { | |
781aab86 | 75 | LL | | |
f20569fa XL |
76 | LL | | a() |
77 | LL | | } else if x < y { | |
781aab86 | 78 | ... | |
f20569fa XL |
79 | LL | | c() |
80 | LL | | } | |
81 | | |_____^ | |
82 | | | |
83 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
84 | ||
85 | error: `if` chain can be rewritten with `match` | |
c620b35d | 86 | --> tests/ui/comparison_chain.rs:137:5 |
f20569fa XL |
87 | | |
88 | LL | / if x > y { | |
781aab86 | 89 | LL | | |
f20569fa XL |
90 | LL | | a() |
91 | LL | | } else if y > x { | |
781aab86 | 92 | ... | |
f20569fa XL |
93 | LL | | c() |
94 | LL | | } | |
95 | | |_____^ | |
96 | | | |
97 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
98 | ||
99 | error: aborting due to 7 previous errors | |
100 |