From 6c2b538c2eb0f64b574f08f91391de3f736e0fd4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 2 Jul 2026 09:51:10 -0700 Subject: [PATCH 1/3] Run clippy on tests/doc crate 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) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83b7ce0..4d68ab1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@clippy - - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic + - run: cargo clippy --workspace --tests -- -Dclippy::all -Dclippy::pedantic outdated: name: Outdated From 27f725f78209e626041112b1dbf0c27b5070ecbd Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 2 Jul 2026 09:54:49 -0700 Subject: [PATCH 2/3] Fix repr_packed_without_abi clippy lint 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) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 54a4de1..11fecb9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -318,7 +318,7 @@ pub fn phantom(args: TokenStream, input: TokenStream) -> TokenStream { } } - #[repr(packed)] + #[repr(Rust, packed)] struct #type_param([*const T; 0]); #[automatically_derived] impl ::core::marker::Copy for #type_param {} From d661ba8fdb98b384c9e427a8c7230ac9d3855fa2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 2 Jul 2026 09:55:35 -0700 Subject: [PATCH 3/3] Raise required compiler to rust 1.74 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) --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d68ab1..51293b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - rust: [nightly, beta, stable, 1.85.0, 1.71.0] + rust: [nightly, beta, stable, 1.85.0, 1.74.0] timeout-minutes: 45 steps: - uses: actions/checkout@v7 @@ -35,7 +35,7 @@ jobs: run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV if: matrix.rust == 'nightly' - run: cargo test - if: matrix.rust != '1.71.0' + if: matrix.rust != '1.74.0' - run: cargo doc --package ghost-test-doc - uses: actions/upload-artifact@v7 if: matrix.rust == 'nightly' && always() diff --git a/Cargo.toml b/Cargo.toml index 0951000..f7c0011 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ documentation = "https://docs.rs/ghost" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/dtolnay/ghost" -rust-version = "1.71" +rust-version = "1.74" [lib] proc-macro = true