Skip to content

[derive] remove erroneous automatically_derived attributes - #3915

Open
mejrs wants to merge 1 commit into
google:mainfrom
mejrs:automatically_derived
Open

mejrs wants to merge 1 commit into
google:mainfrom
mejrs:automatically_derived

Conversation

@mejrs

@mejrs mejrs commented Nov 4, 2026

Copy link
Copy Markdown

This showed up while trying to build rustc in rust-lang/rust#165441 (comment)

I think this won't pass CI but I cannot run tests locally, they fail with

error: the listed checksum of `C:\Users\bruno\rust\zerocopy\zerocopy\vendor\elain\src/lib.rs` has changed:
expected: 9466f0ac041128178d1384cb7537d08054e792ee647c3c21cc572964006750e2
actual:   dbb653d854d1e1b2db1ccaaef55d2c3d748ee96f1e80e3a9d669dcb8cf36b519

directory sources are not intended to be edited, if modifications are required then it is recommended that `[patch]` is used with a forked copy of the source
[cargo-zerocopy] failed while executing command: "rustup" "run" "1.56.0" "cargo" "test"

@google-cla

google-cla Bot commented Nov 4, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T12:36:59.562288Z 66241a4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.94%. Comparing base (f61435d) to head (66241a4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3915   +/-   ##
=======================================
  Coverage   92.94%   92.94%           
=======================================
  Files          16       16           
  Lines        2466     2466           
=======================================
  Hits         2292     2292           
  Misses        174      174           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66241a4fed

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

// While there are not currently any warnings that this suppresses
// (that we're aware of), it's good future-proofing hygiene.
#[automatically_derived]
const _: () = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate snapshots after changing const_block output

When the zerocopy-derive output tests run, every expansion produced here now omits #[automatically_derived], but the checked-in fixtures (for example, src/output_tests/expected/from_bytes_struct.expected.rs) still expect that attribute immediately before const _: (). The test helper in src/output_tests/mod.rs pretty-prints and compares these token streams exactly, so the affected tests will panic and block CI until the expected outputs are regenerated.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

2 participants