You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zerocopy 0.8.60 doesn't compile under Kani: #[cfg(kani)] code uses #[derive(KnownLayout)] without the derive feature #4988
Since zerocopy 0.8.60 (released 2026-10-05 23:02 UTC), any crate that depends on zerocopy without its derive feature fails to compile under Kani. The dependency doesn't have to be direct: rand 0.8 pulls zerocopy in through ppv-lite86.
Kani compiles every crate with --cfg kani, so this module is built for dependencies too. But the KnownLayout derive macro is only available with zerocopy's derive feature, so the module only compiles in zerocopy's own test setup. 0.8.59 doesn't have the module.
Workarounds, both checked with Kani main (1640445da):
Pin zerocopy = "=0.8.59", directly or in Cargo.lock.
Enable the feature: zerocopy = { version = "0.8.60", features = ["derive"] }.
Impact on Kani's CI. Three cargo-kani tests depend on rand 0.8 and fail the same way: cbmc-unknown-lang-mode, dependencies, and stubbing-validate-random. That makes the required regression check fail on every PR, and on main's nightly runs. A PR pinning them to 0.8.59 follows.
The real fix belongs in zerocopy, either gating the module on test alone or on the derive feature as well. Reported as google/zerocopy#3792.
Fixed upstream in zerocopy 0.8.61 (google/zerocopy#3792). Only 0.8.60 is affected: if a project pinned it or has it in Cargo.lock, cargo update -p zerocopy is enough. Verified with Kani: a crate depending on zerocopy = "=0.8.62" compiles and verifies, and Kani's three affected cargo-kani tests pass without a pin, so #4989 is closed.
Activity
feliperodri commentedon Oct 7, 2026
Reported upstream as google/zerocopy#3792. Kani's CI pin: #4989.
feliperodri commentedon Oct 11, 2026
Fixed upstream in zerocopy 0.8.61 (google/zerocopy#3792). Only 0.8.60 is affected: if a project pinned it or has it in
Cargo.lock,cargo update -p zerocopyis enough. Verified with Kani: a crate depending onzerocopy = "=0.8.62"compiles and verifies, and Kani's three affectedcargo-kanitests pass without a pin, so #4989 is closed.Upgrade the Rust toolchain to nightly-2026-10-11 (model-checking#4987)