]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/cast_alignment.stderr
Rollup merge of #84221 - ABouttefeux:generic-arg-elision, r=estebank
[rust.git] / src / tools / clippy / tests / ui / cast_alignment.stderr
1 error: casting from `*const u8` to a more-strictly-aligned pointer (`*const u16`) (1 < 2 bytes)
2   --> $DIR/cast_alignment.rs:12: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:13: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:16: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:17:5
23    |
24 LL |     (&mut 1u8 as *mut u8).cast::<u16>();
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error: aborting due to 4 previous errors
28