Skip to content

[derive] Use ASCII prefix for field marker types - #4029

Closed
ArnabOPP wants to merge 1 commit into
google:mainfrom
ArnabOPP:fix-uncommon-codepoints-lint
Closed

ArnabOPP wants to merge 1 commit into
google:mainfrom
ArnabOPP:fix-uncommon-codepoints-lint

Conversation

@ArnabOPP

Copy link
Copy Markdown

The marker types that derive(Project) generates for each field were named with a ẕ prefix. Recent nightly rustc versions report identifiers containing this character via the uncommon_codepoints lint. That lint is checked for the whole crate, so it cannot be silenced with an #[allow] on the generated items, and it fired in every crate that derived TryFromBytes, FromZeros or FromBytes.

Name the marker types ___ZcField_<name> instead, matching the ___Zc convention used for other generated names. Add a regression test that denies uncommon_codepoints while using the derives.

Fixes #3929

Testing

  • On nightly-2026-11-20, all zerocopy-derive test suites pass.
  • The new regression test (tests/issue_3929.rs) fails without the change, with identifier contains an uncommon character: 'ẕ'.
  • The tests/ui/privacy* files were updated by the same rename by hand, because the UI runner does not run on my Windows machine. Please rely on CI for those, and for the MSRV toolchain.

🤖 Generated with Claude Code

The marker types that `derive(Project)` generates for each field were
named with a `ẕ` prefix. Recent nightly rustc versions report
identifiers containing this character via the `uncommon_codepoints`
lint. That lint is checked for the whole crate, so it cannot be
silenced with an `#[allow]` on the generated items, and it fired in
every crate that derived `TryFromBytes`, `FromZeros` or `FromBytes`.

Name the marker types `___ZcField_<name>` instead, matching the
`___Zc` convention used for other generated names. Add a regression
test that denies `uncommon_codepoints` while using the derives.

Fixes google#3929

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@google-cla

google-cla Bot commented Nov 21, 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 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T08:34:33.052090Z 2b57cd1 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.99%. Comparing base (907b917) to head (2b57cd1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4029   +/-   ##
=======================================
  Coverage   92.99%   92.99%           
=======================================
  Files          16       16           
  Lines        2469     2469           
=======================================
  Hits         2296     2296           
  Misses        173      173           

☔ 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: 2b57cd142e

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

error: type `private::_::_::_::ẕb` is private
error: type `private::_::_::_::___ZcField_b` is private

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 privacy diagnostics instead of hand-editing snapshots

BLOCKING: The commit message explicitly says the privacy .stderr files were hand-edited because the UI runner could not run on Windows. zerocopy/AGENTS.md mandates the development skill, whose skills/zerocopy-development/references/ui-tests.md procedure states “Never edit .stderr files directly” and requires regeneration through the update script or its commands. Regenerate both stable and nightly expectations using that procedure, resolving the runner failure rather than substituting expected diagnostics manually, so these baselines are confirmed against the repository-selected compilers.

AGENTS.md reference: zerocopy/AGENTS.md:L56-L57

Useful? React with 👍 / 👎.

@ArnabOPP

Copy link
Copy Markdown
Author

Closing as a duplicate of #3930, which makes the same change (the same ___ZcField_ prefix) and was opened first. Sorry for the noise; I missed that PR when I started.

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.

Derives trigger uncommon_codepoints on nightly

2 participants