rust/tests/ui/repr_packed_without_abi.stderr
2024-12-26 15:15:54 +01:00

35 lines
1.2 KiB
Text

error: item uses `packed` representation without ABI-qualification
--> tests/ui/repr_packed_without_abi.rs:4:1
|
LL | #[repr(packed)]
| ------ `packed` representation set here
LL | / struct NetworkPacketHeader {
LL | | header_length: u8,
LL | | header_version: u16,
LL | | }
| |_^
|
= warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI
= help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]`
note: the lint level is defined here
--> tests/ui/repr_packed_without_abi.rs:1:9
|
LL | #![deny(clippy::repr_packed_without_abi)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: item uses `packed` representation without ABI-qualification
--> tests/ui/repr_packed_without_abi.rs:10:1
|
LL | #[repr(packed)]
| ------ `packed` representation set here
LL | / union Foo {
LL | | a: u8,
LL | | b: u16,
LL | | }
| |_^
|
= warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI
= help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]`
error: aborting due to 2 previous errors