ci: allow the non-local variant of the semicolon-in-expressions lint in tests - #11141
Merged
Conversation
…in tests `tokio-test`'s `assert_ready_err!` and `insta`'s `assert_json_snapshot!` expand to a trailing semicolon in expression position, which rustc reports under `semicolon_in_expressions_from_non_local_macros`. The nightly advisory jobs compile test targets with `-D warnings`, so `Nightly unused dependencies` fails to build `tower-batch-control` and `zebra-rpc`. Only nightly knows the new lint name, so `unknown_lints` keeps the allow valid on stable and MSRV toolchains.
conradoplg
approved these changes
Jul 29, 2026
Contributor
Merge Queue Status
This pull request spent 30 minutes 1 second in the queue, including 29 minutes 14 seconds running CI. Required conditions to merge
|
39 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Motivation
The
Nightly unused dependenciesjob in Advisory Checks fails to compiletower-batch-controlandzebra-rpc:Same compiler change as #11131. rustc split
semicolon_in_expressions_from_macrosby macro locality, and macros from external crates moved into the new non-local variant. #11131 covereduint::construct_uint!inzebra-chain. These are the remaining two sites:tokio-test'sassert_ready_err!andinsta'sassert_json_snapshot!, both used in expression position.They only surface in jobs that compile test targets under
-D warnings, which is why the docs build went green without them.Solution
Same three-attribute pattern as #11131, applied at each affected file.
unknown_lintsis required: only nightly knows the new lint name, so naming it directly makes stable and the MSRV toolchains emitunknown_lints, which is warn-by-default and therefore fatal under clippy's-D warnings.Tests
Found by compiling the whole workspace rather than grepping, since cargo stops scheduling work after the first failing unit and masks later ones. It took three passes to reach a clean build; the
zebra-rpcsite was hidden behind thetower-batch-controlfailure.cargo +nightly check --workspace --all-targets --all-featuresunderRUSTFLAGS=-D warnings: clean. This is the first pass over the workspace with no instances of this lint remaining.cargo +stable clippy -p tower-batch-control -p zebra-rpc --all-features --all-targets -- -D warnings: clean, confirming nounknown_lintsregression.cargo test -p tower-batch-control --test worker: 2 passed.cargo test -p zebra-rpc --lib --all-features -- test_rpc_response_data: passed.cargo fmt --all -- --check: clean.Specifications & References
Follow-up Work
book.ymlandadvisory.ymlpair an unpinnednightlytoolchain with-D warnings, so any rustc lint addition or split turns these jobs red without a code change. Worth deciding separately whether to pin.AI Disclosure
PR Checklist
type(scope): description