1 error: casting `bool` to `u8` is more cleanly stated with `u8::from(_)`
2 --> $DIR/cast_lossless_bool.rs:8:13
4 LL | let _ = true as u8;
5 | ^^^^^^^^^^ help: try: `u8::from(true)`
7 = note: `-D clippy::cast-lossless` implied by `-D warnings`
9 error: casting `bool` to `u16` is more cleanly stated with `u16::from(_)`
10 --> $DIR/cast_lossless_bool.rs:9:13
12 LL | let _ = true as u16;
13 | ^^^^^^^^^^^ help: try: `u16::from(true)`
15 error: casting `bool` to `u32` is more cleanly stated with `u32::from(_)`
16 --> $DIR/cast_lossless_bool.rs:10:13
18 LL | let _ = true as u32;
19 | ^^^^^^^^^^^ help: try: `u32::from(true)`
21 error: casting `bool` to `u64` is more cleanly stated with `u64::from(_)`
22 --> $DIR/cast_lossless_bool.rs:11:13
24 LL | let _ = true as u64;
25 | ^^^^^^^^^^^ help: try: `u64::from(true)`
27 error: casting `bool` to `u128` is more cleanly stated with `u128::from(_)`
28 --> $DIR/cast_lossless_bool.rs:12:13
30 LL | let _ = true as u128;
31 | ^^^^^^^^^^^^ help: try: `u128::from(true)`
33 error: casting `bool` to `usize` is more cleanly stated with `usize::from(_)`
34 --> $DIR/cast_lossless_bool.rs:13:13
36 LL | let _ = true as usize;
37 | ^^^^^^^^^^^^^ help: try: `usize::from(true)`
39 error: casting `bool` to `i8` is more cleanly stated with `i8::from(_)`
40 --> $DIR/cast_lossless_bool.rs:15:13
42 LL | let _ = true as i8;
43 | ^^^^^^^^^^ help: try: `i8::from(true)`
45 error: casting `bool` to `i16` is more cleanly stated with `i16::from(_)`
46 --> $DIR/cast_lossless_bool.rs:16:13
48 LL | let _ = true as i16;
49 | ^^^^^^^^^^^ help: try: `i16::from(true)`
51 error: casting `bool` to `i32` is more cleanly stated with `i32::from(_)`
52 --> $DIR/cast_lossless_bool.rs:17:13
54 LL | let _ = true as i32;
55 | ^^^^^^^^^^^ help: try: `i32::from(true)`
57 error: casting `bool` to `i64` is more cleanly stated with `i64::from(_)`
58 --> $DIR/cast_lossless_bool.rs:18:13
60 LL | let _ = true as i64;
61 | ^^^^^^^^^^^ help: try: `i64::from(true)`
63 error: casting `bool` to `i128` is more cleanly stated with `i128::from(_)`
64 --> $DIR/cast_lossless_bool.rs:19:13
66 LL | let _ = true as i128;
67 | ^^^^^^^^^^^^ help: try: `i128::from(true)`
69 error: casting `bool` to `isize` is more cleanly stated with `isize::from(_)`
70 --> $DIR/cast_lossless_bool.rs:20:13
72 LL | let _ = true as isize;
73 | ^^^^^^^^^^^^^ help: try: `isize::from(true)`
75 error: casting `bool` to `u16` is more cleanly stated with `u16::from(_)`
76 --> $DIR/cast_lossless_bool.rs:23:13
78 LL | let _ = (true | false) as u16;
79 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(true | false)`
81 error: casting `bool` to `u8` is more cleanly stated with `u8::from(_)`
82 --> $DIR/cast_lossless_bool.rs:51:13
84 LL | let _ = true as u8;
85 | ^^^^^^^^^^ help: try: `u8::from(true)`
87 error: aborting due to 14 previous errors