1 error: boolean to int conversion using if
2 --> $DIR/bool_to_int_with_if.rs:16:5
9 | |_____^ help: replace with from: `i32::from(a)`
11 = note: `a as i32` or `a.into()` can also be valid options
12 = note: `-D clippy::bool-to-int-with-if` implied by `-D warnings`
14 error: boolean to int conversion using if
15 --> $DIR/bool_to_int_with_if.rs:21:5
22 | |_____^ help: replace with from: `i32::from(!a)`
24 = note: `!a as i32` or `(!a).into()` can also be valid options
26 error: boolean to int conversion using if
27 --> $DIR/bool_to_int_with_if.rs:26:5
34 | |_____^ help: replace with from: `i32::from(!a)`
36 = note: `!a as i32` or `(!a).into()` can also be valid options
38 error: boolean to int conversion using if
39 --> $DIR/bool_to_int_with_if.rs:31:5
46 | |_____^ help: replace with from: `i32::from(a || b)`
48 = note: `(a || b) as i32` or `(a || b).into()` can also be valid options
50 error: boolean to int conversion using if
51 --> $DIR/bool_to_int_with_if.rs:36:5
53 LL | / if cond(a, b) {
58 | |_____^ help: replace with from: `i32::from(cond(a, b))`
60 = note: `cond(a, b) as i32` or `cond(a, b).into()` can also be valid options
62 error: boolean to int conversion using if
63 --> $DIR/bool_to_int_with_if.rs:41:5
70 | |_____^ help: replace with from: `i32::from(x + y < 4)`
72 = note: `(x + y < 4) as i32` or `(x + y < 4).into()` can also be valid options
74 error: boolean to int conversion using if
75 --> $DIR/bool_to_int_with_if.rs:50:12
83 | |_____^ help: replace with from: `{ i32::from(b) }`
85 = note: `b as i32` or `b.into()` can also be valid options
87 error: boolean to int conversion using if
88 --> $DIR/bool_to_int_with_if.rs:59:12
96 | |_____^ help: replace with from: `{ i32::from(!b) }`
98 = note: `!b as i32` or `(!b).into()` can also be valid options
100 error: boolean to int conversion using if
101 --> $DIR/bool_to_int_with_if.rs:119:5
103 LL | if a { 1 } else { 0 }
104 | ^^^^^^^^^^^^^^^^^^^^^ help: replace with from: `u8::from(a)`
106 = note: `a as u8` or `a.into()` can also be valid options
108 error: aborting due to 9 previous errors