about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/same_functions_in_if_condition.stderr
blob: 59f4511757d616bc1d02dfb06ef39220601d8cec (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
error: these `if` branches have the same function call
  --> tests/ui/same_functions_in_if_condition.rs:33:8
   |
LL |     if function() {
   |        ^^^^^^^^^^
LL |
LL |     } else if function() {
   |               ^^^^^^^^^^
   |
note: the lint level is defined here
  --> tests/ui/same_functions_in_if_condition.rs:2:9
   |
LL | #![deny(clippy::same_functions_in_if_condition)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: these `if` branches have the same function call
  --> tests/ui/same_functions_in_if_condition.rs:38:8
   |
LL |     if fn_arg(a) {
   |        ^^^^^^^^^
LL |
LL |     } else if fn_arg(a) {
   |               ^^^^^^^^^

error: these `if` branches have the same function call
  --> tests/ui/same_functions_in_if_condition.rs:43:8
   |
LL |     if obj.method() {
   |        ^^^^^^^^^^^^
LL |
LL |     } else if obj.method() {
   |               ^^^^^^^^^^^^

error: these `if` branches have the same function call
  --> tests/ui/same_functions_in_if_condition.rs:48:8
   |
LL |     if obj.method_arg(a) {
   |        ^^^^^^^^^^^^^^^^^
LL |
LL |     } else if obj.method_arg(a) {
   |               ^^^^^^^^^^^^^^^^^

error: these `if` branches have the same function call
  --> tests/ui/same_functions_in_if_condition.rs:54:8
   |
LL |     if v.pop().is_none() {
   |        ^^^^^^^^^^^^^^^^^
LL |
LL |     } else if v.pop().is_none() {
   |               ^^^^^^^^^^^^^^^^^

error: these `if` branches have the same function call
  --> tests/ui/same_functions_in_if_condition.rs:59:8
   |
LL |     if v.len() == 42 {
   |        ^^^^^^^^^^^^^
LL |
LL |     } else if v.len() == 42 {
   |               ^^^^^^^^^^^^^

error: aborting due to 6 previous errors