]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: casting from `*const u8` to a more-strictly-aligned pointer (`*const u16`) (1 < 2 bytes) |
5099ac24 | 2 | --> $DIR/cast_alignment.rs:18:5 |
f20569fa XL |
3 | | |
4 | LL | (&1u8 as *const u8) as *const u16; | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `-D clippy::cast-ptr-alignment` implied by `-D warnings` | |
8 | ||
9 | error: casting from `*mut u8` to a more-strictly-aligned pointer (`*mut u16`) (1 < 2 bytes) | |
5099ac24 | 10 | --> $DIR/cast_alignment.rs:19:5 |
f20569fa XL |
11 | | |
12 | LL | (&mut 1u8 as *mut u8) as *mut u16; | |
13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
14 | ||
15 | error: casting from `*const u8` to a more-strictly-aligned pointer (`*const u16`) (1 < 2 bytes) | |
5099ac24 | 16 | --> $DIR/cast_alignment.rs:22:5 |
f20569fa XL |
17 | | |
18 | LL | (&1u8 as *const u8).cast::<u16>(); | |
19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
20 | ||
21 | error: casting from `*mut u8` to a more-strictly-aligned pointer (`*mut u16`) (1 < 2 bytes) | |
5099ac24 | 22 | --> $DIR/cast_alignment.rs:23:5 |
f20569fa XL |
23 | | |
24 | LL | (&mut 1u8 as *mut u8).cast::<u16>(); | |
25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
26 | ||
27 | error: aborting due to 4 previous errors | |
28 |