]> git.lizzy.rs Git - rust.git/blob - tests/ui/comparison_chain.stderr
Merge remote-tracking branch 'upstream/rust-1.36.0' into backport_merge
[rust.git] / tests / ui / comparison_chain.stderr
1 error: `if` chain can be rewritten with `match`
2   --> $DIR/comparison_chain.rs:14:5
3    |
4 LL | /     if x > y {
5 LL | |         a()
6 LL | |     } else if x < y {
7 LL | |         b()
8 LL | |     }
9    | |_____^
10    |
11    = note: `-D clippy::comparison-chain` implied by `-D warnings`
12    = help: Consider rewriting the `if` chain to use `cmp` and `match`.
13
14 error: `if` chain can be rewritten with `match`
15   --> $DIR/comparison_chain.rs:27:5
16    |
17 LL | /     if x > y {
18 LL | |         a()
19 LL | |     } else if x < y {
20 LL | |         b()
21 LL | |     } else {
22 LL | |         c()
23 LL | |     }
24    | |_____^
25    |
26    = help: Consider rewriting the `if` chain to use `cmp` and `match`.
27
28 error: `if` chain can be rewritten with `match`
29   --> $DIR/comparison_chain.rs:35:5
30    |
31 LL | /     if x > y {
32 LL | |         a()
33 LL | |     } else if y > x {
34 LL | |         b()
35 LL | |     } else {
36 LL | |         c()
37 LL | |     }
38    | |_____^
39    |
40    = help: Consider rewriting the `if` chain to use `cmp` and `match`.
41
42 error: `if` chain can be rewritten with `match`
43   --> $DIR/comparison_chain.rs:43:5
44    |
45 LL | /     if x > 1 {
46 LL | |         a()
47 LL | |     } else if x < 1 {
48 LL | |         b()
49 LL | |     } else if x == 1 {
50 LL | |         c()
51 LL | |     }
52    | |_____^
53    |
54    = help: Consider rewriting the `if` chain to use `cmp` and `match`.
55
56 error: aborting due to 4 previous errors
57