1
1
error: `if` chain can be rewritten with `match`
2
- --> tests/ui/comparison_chain.rs:15 :5
2
+ --> tests/ui/comparison_chain.rs:29 :5
3
3
|
4
4
LL | / if x > y {
5
5
LL | |
6
6
LL | |
7
7
LL | | a()
8
- LL | | } else if x < y {
9
- LL | | b ()
8
+ ... |
9
+ LL | | c ()
10
10
LL | | }
11
11
| |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
12
12
|
13
13
= note: `-D clippy::comparison-chain` implied by `-D warnings`
14
14
= help: to override `-D warnings` add `#[allow(clippy::comparison_chain)]`
15
15
16
16
error: `if` chain can be rewritten with `match`
17
- --> tests/ui/comparison_chain.rs:30:5
18
- |
19
- LL | / if x > y {
20
- LL | |
21
- LL | |
22
- LL | | a()
23
- ... |
24
- LL | | c()
25
- LL | | }
26
- | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
27
-
28
- error: `if` chain can be rewritten with `match`
29
- --> tests/ui/comparison_chain.rs:40:5
17
+ --> tests/ui/comparison_chain.rs:39:5
30
18
|
31
19
LL | / if x > y {
32
20
LL | |
@@ -38,7 +26,7 @@ LL | | }
38
26
| |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
39
27
40
28
error: `if` chain can be rewritten with `match`
41
- --> tests/ui/comparison_chain.rs:50 :5
29
+ --> tests/ui/comparison_chain.rs:49 :5
42
30
|
43
31
LL | / if x > 1 {
44
32
LL | |
@@ -50,19 +38,7 @@ LL | | }
50
38
| |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&1) {...}`
51
39
52
40
error: `if` chain can be rewritten with `match`
53
- --> tests/ui/comparison_chain.rs:126:5
54
- |
55
- LL | / if x > y {
56
- LL | |
57
- LL | |
58
- LL | | a()
59
- LL | | } else if x < y {
60
- LL | | b()
61
- LL | | }
62
- | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
63
-
64
- error: `if` chain can be rewritten with `match`
65
- --> tests/ui/comparison_chain.rs:134:5
41
+ --> tests/ui/comparison_chain.rs:132:5
66
42
|
67
43
LL | / if x > y {
68
44
LL | |
@@ -74,7 +50,7 @@ LL | | }
74
50
| |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
75
51
76
52
error: `if` chain can be rewritten with `match`
77
- --> tests/ui/comparison_chain.rs:144 :5
53
+ --> tests/ui/comparison_chain.rs:142 :5
78
54
|
79
55
LL | / if x > y {
80
56
LL | |
@@ -86,7 +62,7 @@ LL | | }
86
62
| |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
87
63
88
64
error: `if` chain can be rewritten with `match`
89
- --> tests/ui/comparison_chain.rs:251 :5
65
+ --> tests/ui/comparison_chain.rs:249 :5
90
66
|
91
67
LL | / if x + 1 > y * 2 {
92
68
LL | |
@@ -97,5 +73,5 @@ LL | | "cc"
97
73
LL | | }
98
74
| |_____^ help: consider rewriting the `if` chain with `match`: `match (x + 1).cmp(&(y * 2)) {...}`
99
75
100
- error: aborting due to 8 previous errors
76
+ error: aborting due to 6 previous errors
101
77
0 commit comments