]>
Commit | Line | Data |
---|---|---|
1 | error: casting from `*const u8` to a more-strictly-aligned pointer (`*const u16`) (1 < 2 bytes) | |
2 | --> $DIR/cast_alignment.rs:18:5 | |
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) | |
10 | --> $DIR/cast_alignment.rs:19:5 | |
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) | |
16 | --> $DIR/cast_alignment.rs:22:5 | |
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) | |
22 | --> $DIR/cast_alignment.rs:23:5 | |
23 | | | |
24 | LL | (&mut 1u8 as *mut u8).cast::<u16>(); | |
25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
26 | ||
27 | error: aborting due to 4 previous errors | |
28 |