@@ -9,7 +9,7 @@ LL | | b()
99LL | | }
1010 | |_____^
1111 |
12- = help: consider rewriting the `if` chain to use ` cmp` and `match `
12+ = help: consider rewriting the `if` chain with: `match x. cmp(&y) {...} `
1313 = note: `-D clippy::comparison-chain` implied by `-D warnings`
1414 = help: to override `-D warnings` add `#[allow(clippy::comparison_chain)]`
1515
@@ -25,7 +25,7 @@ LL | | c()
2525LL | | }
2626 | |_____^
2727 |
28- = help: consider rewriting the `if` chain to use ` cmp` and `match `
28+ = help: consider rewriting the `if` chain with: `match x. cmp(&y) {...} `
2929
3030error: `if` chain can be rewritten with `match`
3131 --> tests/ui/comparison_chain.rs:37:5
@@ -39,7 +39,7 @@ LL | | c()
3939LL | | }
4040 | |_____^
4141 |
42- = help: consider rewriting the `if` chain to use ` cmp` and `match `
42+ = help: consider rewriting the `if` chain with: `match x. cmp(&y) {...} `
4343
4444error: `if` chain can be rewritten with `match`
4545 --> tests/ui/comparison_chain.rs:46:5
@@ -53,7 +53,7 @@ LL | | c()
5353LL | | }
5454 | |_____^
5555 |
56- = help: consider rewriting the `if` chain to use ` cmp` and `match `
56+ = help: consider rewriting the `if` chain with: `match x. cmp(&1) {...} `
5757
5858error: `if` chain can be rewritten with `match`
5959 --> tests/ui/comparison_chain.rs:121:5
@@ -66,7 +66,7 @@ LL | | b()
6666LL | | }
6767 | |_____^
6868 |
69- = help: consider rewriting the `if` chain to use ` cmp` and `match `
69+ = help: consider rewriting the `if` chain with: `match x. cmp(&y) {...} `
7070
7171error: `if` chain can be rewritten with `match`
7272 --> tests/ui/comparison_chain.rs:128:5
@@ -80,7 +80,7 @@ LL | | c()
8080LL | | }
8181 | |_____^
8282 |
83- = help: consider rewriting the `if` chain to use ` cmp` and `match `
83+ = help: consider rewriting the `if` chain with: `match x. cmp(&y) {...} `
8484
8585error: `if` chain can be rewritten with `match`
8686 --> tests/ui/comparison_chain.rs:137:5
@@ -94,7 +94,21 @@ LL | | c()
9494LL | | }
9595 | |_____^
9696 |
97- = help: consider rewriting the `if` chain to use ` cmp` and `match `
97+ = help: consider rewriting the `if` chain with: `match x. cmp(&y) {...} `
9898
99- error: aborting due to 7 previous errors
99+ error: `if` chain can be rewritten with `match`
100+ --> tests/ui/comparison_chain.rs:243:5
101+ |
102+ LL | / if x + 1 > y * 2 {
103+ LL | |
104+ LL | | "aa"
105+ LL | | } else if x + 1 < y * 2 {
106+ ... |
107+ LL | | "cc"
108+ LL | | }
109+ | |_____^
110+ |
111+ = help: consider rewriting the `if` chain with: `match (x + 1).cmp(&(y * 2)) {...}`
112+
113+ error: aborting due to 8 previous errors
100114
0 commit comments