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