Skip to content

Resolve repr_packed_without_abi clippy lint #45

Merged
dtolnay merged 3 commits into
masterfrom
packed
Jul 2, 2026
Merged

Resolve repr_packed_without_abi clippy lint #45
dtolnay merged 3 commits into
masterfrom
packed

Conversation

@dtolnay

@dtolnay dtolnay commented Jul 2, 2026

Copy link
Copy Markdown
Owner
warning: item uses `packed` representation without ABI-qualification
 --> tests/doc/src/lib.rs:3:1
  |
3 | #[phantom]
  | ^^^^^^^^^^ `packed` representation set here
  |
  = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI
  = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
  = note: `#[warn(clippy::repr_packed_without_abi)]` on by default
  = note: this warning originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info)

Closes #44.

dtolnay added 3 commits July 2, 2026 09:51
    warning: item uses `packed` representation without ABI-qualification
     --> tests/doc/src/lib.rs:3:1
      |
    3 | #[phantom]
      | ^^^^^^^^^^ `packed` representation set here
      |
      = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI
      = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]`
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
      = note: `#[warn(clippy::repr_packed_without_abi)]` on by default
      = note: this warning originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info)
    warning: item uses `packed` representation without ABI-qualification
     --> tests/doc/src/lib.rs:3:1
      |
    3 | #[phantom]
      | ^^^^^^^^^^ `packed` representation set here
      |
      = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI
      = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]`
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
      = note: `#[warn(clippy::repr_packed_without_abi)]` on by default
      = note: this warning originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info)
    error[E0552]: unrecognized representation hint
     --> tests/doc/src/lib.rs:3:1
      |
    3 | #[phantom]
      | ^^^^^^^^^^
      |
      = help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
      = note: this error originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info)
@dtolnay dtolnay merged commit 83acbc0 into master Jul 2, 2026
18 checks passed
@dtolnay dtolnay deleted the packed branch July 2, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant