about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/comparison_chain.stderr
blob: ce580bd54a16a1472e776b601955f9e810c6dd7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
error: `if` chain can be rewritten with `match`
  --> tests/ui/comparison_chain.rs:29:5
   |
LL | /     if x > y {
LL | |
LL | |
LL | |         a()
...  |
LL | |         c()
LL | |     }
   | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`
   |
   = note: `-D clippy::comparison-chain` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::comparison_chain)]`

error: `if` chain can be rewritten with `match`
  --> tests/ui/comparison_chain.rs:39:5
   |
LL | /     if x > y {
LL | |
LL | |
LL | |         a()
...  |
LL | |         c()
LL | |     }
   | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`

error: `if` chain can be rewritten with `match`
  --> tests/ui/comparison_chain.rs:49:5
   |
LL | /     if x > 1 {
LL | |
LL | |
LL | |         a()
...  |
LL | |         c()
LL | |     }
   | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&1) {...}`

error: `if` chain can be rewritten with `match`
  --> tests/ui/comparison_chain.rs:132:5
   |
LL | /     if x > y {
LL | |
LL | |
LL | |         a()
...  |
LL | |         c()
LL | |     }
   | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`

error: `if` chain can be rewritten with `match`
  --> tests/ui/comparison_chain.rs:142:5
   |
LL | /     if x > y {
LL | |
LL | |
LL | |         a()
...  |
LL | |         c()
LL | |     }
   | |_____^ help: consider rewriting the `if` chain with `match`: `match x.cmp(&y) {...}`

error: `if` chain can be rewritten with `match`
  --> tests/ui/comparison_chain.rs:249:5
   |
LL | /     if x + 1 > y * 2 {
LL | |
LL | |
LL | |         "aa"
...  |
LL | |         "cc"
LL | |     }
   | |_____^ help: consider rewriting the `if` chain with `match`: `match (x + 1).cmp(&(y * 2)) {...}`

error: aborting due to 6 previous errors