1
1
error: boolean to int conversion using if
2
- --> $DIR/bool_to_int_with_if.rs:15 :5
2
+ --> $DIR/bool_to_int_with_if.rs:16 :5
3
3
|
4
4
LL | / if a {
5
5
LL | | 1
@@ -12,7 +12,7 @@ LL | | };
12
12
= note: `-D clippy::bool-to-int-with-if` implied by `-D warnings`
13
13
14
14
error: boolean to int conversion using if
15
- --> $DIR/bool_to_int_with_if.rs:20 :5
15
+ --> $DIR/bool_to_int_with_if.rs:21 :5
16
16
|
17
17
LL | / if a {
18
18
LL | | 0
@@ -24,7 +24,7 @@ LL | | };
24
24
= note: `!a as i32` or `(!a).into()` can also be valid options
25
25
26
26
error: boolean to int conversion using if
27
- --> $DIR/bool_to_int_with_if.rs:25 :5
27
+ --> $DIR/bool_to_int_with_if.rs:26 :5
28
28
|
29
29
LL | / if !a {
30
30
LL | | 1
@@ -36,7 +36,7 @@ LL | | };
36
36
= note: `!a as i32` or `(!a).into()` can also be valid options
37
37
38
38
error: boolean to int conversion using if
39
- --> $DIR/bool_to_int_with_if.rs:30 :5
39
+ --> $DIR/bool_to_int_with_if.rs:31 :5
40
40
|
41
41
LL | / if a || b {
42
42
LL | | 1
@@ -48,7 +48,7 @@ LL | | };
48
48
= note: `(a || b) as i32` or `(a || b).into()` can also be valid options
49
49
50
50
error: boolean to int conversion using if
51
- --> $DIR/bool_to_int_with_if.rs:35 :5
51
+ --> $DIR/bool_to_int_with_if.rs:36 :5
52
52
|
53
53
LL | / if cond(a, b) {
54
54
LL | | 1
@@ -60,7 +60,7 @@ LL | | };
60
60
= note: `cond(a, b) as i32` or `cond(a, b).into()` can also be valid options
61
61
62
62
error: boolean to int conversion using if
63
- --> $DIR/bool_to_int_with_if.rs:40 :5
63
+ --> $DIR/bool_to_int_with_if.rs:41 :5
64
64
|
65
65
LL | / if x + y < 4 {
66
66
LL | | 1
@@ -72,7 +72,7 @@ LL | | };
72
72
= note: `(x + y < 4) as i32` or `(x + y < 4).into()` can also be valid options
73
73
74
74
error: boolean to int conversion using if
75
- --> $DIR/bool_to_int_with_if.rs:49 :12
75
+ --> $DIR/bool_to_int_with_if.rs:50 :12
76
76
|
77
77
LL | } else if b {
78
78
| ____________^
@@ -85,7 +85,7 @@ LL | | };
85
85
= note: `b as i32` or `b.into()` can also be valid options
86
86
87
87
error: boolean to int conversion using if
88
- --> $DIR/bool_to_int_with_if.rs:58 :12
88
+ --> $DIR/bool_to_int_with_if.rs:59 :12
89
89
|
90
90
LL | } else if b {
91
91
| ____________^
@@ -98,7 +98,7 @@ LL | | };
98
98
= note: `!b as i32` or `(!b).into()` can also be valid options
99
99
100
100
error: boolean to int conversion using if
101
- --> $DIR/bool_to_int_with_if.rs:118 :5
101
+ --> $DIR/bool_to_int_with_if.rs:119 :5
102
102
|
103
103
LL | if a { 1 } else { 0 }
104
104
| ^^^^^^^^^^^^^^^^^^^^^ help: replace with from: `u8::from(a)`
0 commit comments