]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/cast_alignment.stderr
New upstream version 1.60.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / cast_alignment.stderr
CommitLineData
f20569fa 1error: 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 |
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)
5099ac24 10 --> $DIR/cast_alignment.rs:19:5
f20569fa
XL
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)
5099ac24 16 --> $DIR/cast_alignment.rs:22:5
f20569fa
XL
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)
5099ac24 22 --> $DIR/cast_alignment.rs:23:5
f20569fa
XL
23 |
24LL | (&mut 1u8 as *mut u8).cast::<u16>();
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27error: aborting due to 4 previous errors
28