Repository navigation
fix(ci): rustc 1.98.0 added clippy::chunks_exact_to_as_chunks — sweep all 15 sites - #1014
Merged
Merged
Conversation
… all 15 sites TOOLCHAIN DRIFT, NOT A CODE CHANGE. The Clippy job uses an unpinned `dtolnay/rust-toolchain@stable`, and the GitHub runner's stable moved 1.97.1 -> 1.98.0 partway through 2026-08-20. Proven from the runs' own logs: main's PASSING Clippy at 06:27Z reports `rustc 1.97.1`; a branch adding only a YAML file FAILED at 20:22Z reporting `rustc 1.98.0`. 1.98.0 introduced `clippy::chunks_exact_to_as_chunks`, which `-D warnings` promotes to a hard error, so every open PR reds until this lands. CI reported ONE site. There were FIFTEEN. clippy fails a crate on the first error and never reaches the rest, so the first report is a lower bound, not the set — the same "first decline only" shape as scan_for_decline in the WCET model. The compiler enumerated the real set across three passes as each crate unblocked the next. Fixed rather than suppressed: `slice::as_chunks` stabilised in exactly 1.88.0, read from the local std source's `#[rustc_const_stable(... since = "1.88.0")]`, and 1.88 is this workspace's MSRV. So the idiomatic fix is available without an `#[allow]` or an MSRV bump. Four `try_into().unwrap()` calls disappear as a side effect, because as_chunks yields `[u8; N]` directly. ONE TRANSFORMATION SUBTLETY, caught by the compiler and worth recording: the closure rewrite differs between `.map()` and `.filter()`. After `.iter()`, map's closure receives `&[u8; N]` so `|&c|` binds `[u8; N]` correctly, but filter's receives `&&[u8; N]` so `|&c|` leaves a `&[u8; N]` and `from_le_bytes` rejects it. Three filter sites needed `|&&c|`. A pattern that is right for one adapter and wrong for the neighbouring one is exactly what a local verification pass exists to catch. VERIFIED ON BOTH TOOLCHAINS, exit codes captured directly: rustc 1.98.0: clippy 0, cargo test --workspace 0 (146 result blocks, 0 failed) rustc 1.96.1: clippy 0 (so this does not trade one break for another) fmt --check 0, claim_check 49/49, model_coverage_audit --check 0 Byte-identity: `frozen_codegen_bytes` is in the passing suite, so the 10 anchors are unchanged — these sites decode bytes, they do not emit them. Refs #242.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Aug 20, 2026
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.
Unblocks every open PR. This is toolchain drift, not a code change.
What happened
The Clippy job uses an unpinned
dtolnay/rust-toolchain@stable, and the GitHub runner's stable moved 1.97.1 → 1.98.0 partway through 2026-08-20. Proven from the runs' own logs:main@32c7e195(the v0.58.0 release commit)1.98.0 introduced
clippy::chunks_exact_to_as_chunks, which-D warningspromotes to a hard error. Every open PR reds until this lands.CI reported one site. There were fifteen.
cargo clippyfails a crate on its first error and never reaches the rest, so the reported site is a lower bound, not the set — the same "first decline only" shape asscan_for_declinein the WCET model. The compiler enumerated the real set across three passes as each crate unblocked the next: 1 → 8 → 15, acrosssynth-abi,synth-backend,synth-backend-riscvand sevensynth-clitests.Fixed, not suppressed
slice::as_chunksstabilised in exactly 1.88.0 — read from the local std source's#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")], and 1.88 is this workspace's MSRV. So the idiomatic fix is available without an#[allow]or an MSRV bump. Fourtry_into().unwrap()calls disappear as a side effect, sinceas_chunksyields[u8; N]directly.One subtlety, caught by the compiler
The closure rewrite differs between
.map()and.filter(). After.iter(), map's closure receives&[u8; N], so|&c|binds[u8; N]correctly — but filter's receives&&[u8; N], so|&c|leaves a&[u8; N]andfrom_le_bytesrejects it. Three filter sites needed|&&c|.A pattern that is right for one adapter and wrong for the neighbouring one is exactly what a local verification pass exists to catch. I could not have caught it locally at first: rustc 1.96.1 does not have this lint at all, so
cargo clippywould have stayed silent whether the fix was right or wrong. I installed 1.98.0 to match CI and reproduced the failure before changing a line.Gates — both toolchains, exit codes captured directly
Byte-identity:
frozen_codegen_bytesis in the passing suite, so the 10 anchors are unchanged. These sites decode bytes; they do not emit them.Worth a follow-up, not fixed here
This is the second
dtolnay/rust-toolchainbreak this session, from opposite causes: #984 bumped a pinned ref on the MC/DC job (where the ref is the compiler and the floors are counts over lowered wasm), and today an unpinned ref moved on its own under Clippy. The right answer differs per job — measurement jobs must pin, lint jobs arguably should float so new lints get caught — but a floating ref means a Rust release can red an unrelated PR at any moment, which is exactly what happened to a YAML-only change. A coherent float-vs-pin policy belongs alongside #965's dependency-hold enforcement in v0.59.Refs #242.