1
1
error: these `if` branches have the same condition
2
- --> tests/ui/ifs_same_cond.rs:8 :8
2
+ --> tests/ui/ifs_same_cond.rs:10 :8
3
3
|
4
4
LL | if b {
5
5
| ^
@@ -11,7 +11,7 @@ LL | } else if b {
11
11
= help: to override `-D warnings` add `#[allow(clippy::ifs_same_cond)]`
12
12
13
13
error: these `if` branches have the same condition
14
- --> tests/ui/ifs_same_cond.rs:13 :8
14
+ --> tests/ui/ifs_same_cond.rs:15 :8
15
15
|
16
16
LL | if b {
17
17
| ^
@@ -22,7 +22,7 @@ LL | } else if b {
22
22
| ^
23
23
24
24
error: these `if` branches have the same condition
25
- --> tests/ui/ifs_same_cond.rs:19 :8
25
+ --> tests/ui/ifs_same_cond.rs:21 :8
26
26
|
27
27
LL | if a == 1 {
28
28
| ^^^^^^
@@ -31,7 +31,7 @@ LL | } else if a == 1 {
31
31
| ^^^^^^
32
32
33
33
error: these `if` branches have the same condition
34
- --> tests/ui/ifs_same_cond.rs:24 :8
34
+ --> tests/ui/ifs_same_cond.rs:26 :8
35
35
|
36
36
LL | if 2 * a == 1 {
37
37
| ^^^^^^^^^^
@@ -40,13 +40,22 @@ LL | } else if 2 * a == 1 {
40
40
| ^^^^^^^^^^
41
41
42
42
error: these `if` branches have the same condition
43
- --> tests/ui/ifs_same_cond.rs:58 :8
43
+ --> tests/ui/ifs_same_cond.rs:60 :8
44
44
|
45
45
LL | if a.contains("ah") {
46
46
| ^^^^^^^^^^^^^^^^
47
47
LL |
48
48
LL | } else if a.contains("ah") {
49
49
| ^^^^^^^^^^^^^^^^
50
50
51
- error: aborting due to 5 previous errors
51
+ error: these `if` branches have the same condition
52
+ --> tests/ui/ifs_same_cond.rs:105:8
53
+ |
54
+ LL | if x.get() {
55
+ | ^^^^^^^
56
+ ...
57
+ LL | } else if x.get() {
58
+ | ^^^^^^^
59
+
60
+ error: aborting due to 6 previous errors
52
61
0 commit comments