Skip to content

ci: allow the non-local variant of the semicolon-in-expressions lint in u256 - #11131

Merged
mergify[bot] merged 1 commit into
mainfrom
fix/u256-non-local-macro-lint
Jul 28, 2026
Merged

ci: allow the non-local variant of the semicolon-in-expressions lint in u256#11131
mergify[bot] merged 1 commit into
mainfrom
fix/u256-non-local-macro-lint

Conversation

@gustavovalverde

Copy link
Copy Markdown
Member

Motivation

The Book workflow has been red on every push to main since 2026-07-27, and the weekly Advisory Checks workflow fails the same way. Both build docs on nightly with -D warnings, and zebra-chain no longer compiles under it:

error: trailing semicolon in macro used in expression position
  --> zebra-chain/src/work/u256.rs:13:1
   = note: `-D semicolon-in-expressions-from-non-local-macros` implied by `-D warnings`

No Zebra change caused this. rustc split semicolon_in_expressions_from_macros into two lints, by where the macro is defined:

lint default covers
semicolon_in_expressions_from_macros deny macros defined in this crate
semicolon_in_expressions_from_non_local_macros warn macros from other crates

uint::construct_uint! comes from an external crate, so it moved out from under the existing allow and into a lint nothing was silencing. uint 0.10.0 is the latest release, so no upstream version fixes the expansion.

This is a hotfix for red main, so it has no prior issue.

Solution

Allow both lint names in u256.rs, together with unknown_lints.

All three are required. Only nightly knows the new name, so naming it directly makes stable emit unknown_lints, which is warn-by-default and therefore fatal under clippy's -D warnings.

A single #![allow(future_incompatible)] would have covered both names and survived any future split, but rustc rejects it here: allow(future_incompatible) is ignored unless specified at crate level, and crate level is far too broad.

Tests

Checked against the three toolchains CI uses:

variant nightly 1.99 stable 1.97 stable 1.91 (MSRV)
before this change fail pass pass
both names, without unknown_lints pass fail fail
this change pass pass pass
  • The verbatim book.yml docs command (cargo doc --no-deps --workspace --all-features --document-private-items under the full CI RUSTDOCFLAGS) exits 0 on nightly 1.99.0.
  • cargo clippy -p zebra-chain --all-features --all-targets -- -D warnings is clean on stable.
  • cargo test -p zebra-chain --lib work:: passes, 43 tests.

Specifications & References

Follow-up Work

book.yml and advisory.yml pair an unpinned nightly toolchain with -D warnings, so any rustc lint addition or split turns main red. This is the second occurrence in ten days. Pinning the nightly is a trade-off worth its own discussion.

book.yml also points readers to lint.yml:jobs.docs, which no longer exists.

AI Disclosure

  • AI tools were used: Claude Code for the root cause analysis, the toolchain test matrix, and this description.

PR Checklist

…lint

rustc splits `semicolon_in_expressions_from_macros` by macro locality, and
`uint::construct_uint!` falls under the non-local variant. The docs jobs deny
all warnings, so `cargo doc --all-features --document-private-items` fails to
compile zebra-chain on the Book and Advisory Checks workflows.

Only nightly knows the new lint name, so `unknown_lints` keeps the allow valid
on stable and MSRV toolchains.
@gustavovalverde gustavovalverde changed the title fix(ci): allow the non-local variant of the semicolon-in-expressions lint ci: allow the non-local variant of the semicolon-in-expressions lint in u256 Jul 28, 2026
@mergify mergify Bot added the queued label Jul 28, 2026
@mergify

mergify Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-28 18:37 UTC · Rule: batched · triggered by rule move to any queue if GitHub Rulesets are satisfied
  • Checks skipped · PR is already up-to-date
  • Merged2026-07-28 18:38 UTC · at 3bab53b6aff9b10048c82f42e6a5f75822833502 · merge

This pull request spent 46 seconds in the queue, including 9 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit b0abbe1 into main Jul 28, 2026
174 of 179 checks passed
@mergify
mergify Bot deleted the fix/u256-non-local-macro-lint branch July 28, 2026 18:38
@mergify mergify Bot removed the queued label Jul 28, 2026
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