[derive] Implement #[zerocopy(on_error = skip/fail)] - #2982
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This attribute allows deriving traits on types that do not meet
requirements (e.g. missing
#[repr(C)]) by suppressing compilationerrors and emitting no implementation instead. On success, emit
#[allow(trivial_bounds)]so that rustc permits code with unsatisfiedtrait bounds.
For now, we're keeping this attribute experimental, requiring users to
pass
--cfg zerocopy_derive_on_errorto enable it.Closes #1769
#[zerocopy(on_error = skip/fail)]#2982Latest Update: v15 — Compare vs v14
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2 && git checkout -b pr-G4f303a34ae0677fde28c03a0e395212a3bd05ab2 FETCH_HEADCheckout
git fetch origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2 && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/G4f303a34ae0677fde28c03a0e395212a3bd05ab2 && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.