1 error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
2 --> $DIR/cast_slice_different_sizes.rs:7:13
4 LL | let b = a as *const [u8];
5 | ^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(a as *const u8, ..)`
7 = note: `#[deny(clippy::cast_slice_different_sizes)]` on by default
9 error: casting between raw pointers to `[u8]` (element size 1) and `[u32]` (element size 4) does not adjust the count
10 --> $DIR/cast_slice_different_sizes.rs:8:13
12 LL | let c = b as *const [u32];
13 | ^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(b as *const u32, ..)`
15 error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
16 --> $DIR/cast_slice_different_sizes.rs:11:16
18 LL | let loss = r_x as *const [i32] as *const [u8];
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(r_x as *const [i32] as *const u8, ..)`
21 error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
22 --> $DIR/cast_slice_different_sizes.rs:18:24
24 LL | let loss_block_1 = { r_x as *const [i32] } as *const [u8];
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts({ r_x as *const [i32] } as *const u8, ..)`
27 error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
28 --> $DIR/cast_slice_different_sizes.rs:19:24
30 LL | let loss_block_2 = {
31 | ________________________^
33 LL | | r_x as *const [i32]
34 LL | | } as *const [u8];
35 | |____________________^
37 help: replace with `ptr::slice_from_raw_parts`
39 LL ~ let loss_block_2 = core::ptr::slice_from_raw_parts({
41 LL + r_x as *const [i32]
42 LL ~ } as *const u8, ..);
45 error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
46 --> $DIR/cast_slice_different_sizes.rs:36:27
48 LL | let long_chain_loss = r_x as *const [i32] as *const [u32] as *const [u16] as *const [i8] as *const [u8];
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(r_x as *const [i32] as *const [u32] as *const [u16] as *const [i8] as *const u8, ..)`
51 error: aborting due to 6 previous errors