Skip to content

[derive] Implement #[zerocopy(on_error = skip/fail)] - #2982

Merged
joshlf merged 1 commit into
mainfrom
G4f303a34ae0677fde28c03a0e395212a3bd05ab2
Feb 5, 2026
Merged

[derive] Implement #[zerocopy(on_error = skip/fail)]#2982
joshlf merged 1 commit into
mainfrom
G4f303a34ae0677fde28c03a0e395212a3bd05ab2

Conversation

@joshlf

@joshlf joshlf commented Feb 4, 2026

Copy link
Copy Markdown
Member

This attribute allows deriving traits on types that do not meet
requirements (e.g. missing #[repr(C)]) by suppressing compilation
errors and emitting no implementation instead. On success, emit
#[allow(trivial_bounds)] so that rustc permits code with unsatisfied
trait bounds.

For now, we're keeping this attribute experimental, requiring users to
pass --cfg zerocopy_derive_on_error to enable it.

Closes #1769


Latest Update: v15 — Compare vs v14

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2 && git checkout -b pr-G4f303a34ae0677fde28c03a0e395212a3bd05ab2 FETCH_HEAD

Checkout

git fetch origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2 && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2 && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2

Stacked PRs enabled by GHerrit.

Loading
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.

Support silent failure in derives

3 participants