Skip to content

Nightly Rust fails on uncommon_codepoints in zerocopy derives #2931

Closed

Description

@josecelano-bot

Problem

The nightly CI jobs (for example Build on macos-latest (nightly) in OS Compatibility) fail with 17 errors identifier contains an uncommon character: 'ẕ' in torrust-tracker-udp-protocol (packages/udp-protocol/src/announce.rs, scrape.rs, ...), on plain ASCII field names. It was first seen on #2920, a docs-only PR: #2920 (comment)

Cause

  1. The structs in torrust-tracker-udp-protocol derive IntoBytes, FromBytes and Immutable from zerocopy 0.8.63.
  2. zerocopy-derive 0.8.63 generates one item named ẕ<field> (U+1E95) per struct field, with the span of our field name. That is why the errors point at our code.
  3. lexer: Update to Unicode 18 rust-lang/rust#165289 ("lexer: Update to Unicode 18", merged 2026-11-17) updated rustc's Unicode security data: U+1E95 is now an "uncommon" identifier character, so the uncommon_codepoints lint fires.
  4. The repository's global -D warnings turns the warnings into errors.

It is an intended upstream data change, so later nightlies will not undo it. It is not specific to macOS and not an sccache artifact.

Reproduction (Linux x86_64)

cargo +nightly-2026-11-17 check -p torrust-tracker-udp-protocol   # rustc 5df8c02af 2026-11-16: OK
cargo +nightly-2026-11-18 check -p torrust-tracker-udp-protocol   # rustc 59cbdee2e 2026-11-17: 17 errors

Stable builds and the tracker's runtime behavior are not affected.

Proposed fix

Add a crate-level #![allow(uncommon_codepoints)] to packages/udp-protocol/src/lib.rs, with a comment that explains the cause, links the upstream report and says to remove it once a zerocopy release no longer generates non-ASCII identifiers. An item-level #[allow] on each struct does not work: rustc only honours this lint at crate level (rust-lang/rust#86824). Only this crate uses the zerocopy derives. Tested locally: with the allow, cargo +nightly-2026-11-18 check --workspace --all-targets is clean, and the crate still builds on stable and on the MSRV 1.88.

Out of scope: allowing the lint workspace-wide, pinning nightly in the workflows, changing the zerocopy version. A report to google/zerocopy will be linked here if filed.

The full specification and evidence will be in docs/issues/open/ in the fix PR.

Activity

  1. added 6 commits that reference this issue on Nov 18, 2026
  2. added 2 commits that reference this issue on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions