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