Skip to content

toolchain: Rust 1.97.1 → 1.98.1, and the chunks_exact → as_chunks shift it forces - #302

Merged
AdaWorldAPI merged 2 commits into
masterfrom
claude/rust-1981-bump
Sep 5, 2026
Merged

toolchain: Rust 1.97.1 → 1.98.1, and the chunks_exact → as_chunks shift it forces#302
AdaWorldAPI merged 2 commits into
masterfrom
claude/rust-1981-bump

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Workspace-wide sweep to current stable (1.98.0 released 2026-08-20, 1.98.1 on 2026-09-01). Repo 2 of 9. This repo's own rule is honoured: the channel and Cargo.toml's rust-version move together (1.97 → 1.98).

Two findings, where lance-graph had one

finding sites
clippy::chunks_exact_to_as_chunks — new in 1.98, default-on style group 6
clippy::from_iter_instead_of_collectremoved in 1.98, and carried in src/lib.rs's crate-level allow list, so the allow itself is now an error 1

The second one does not exist in lance-graph, which is why the sweep measures each repo rather than generalising from the first.

Why as_chunks is the right shape here, not just lint appeasement

chunks_exact was the correct call when these buffers were 4096 and 16384 wide: the remainder is always empty at those widths and the runtime width check is dead weight. At the 32+96 shape, the classid plus the twelve-byte facet payload, the width is a compile-time fact, and as_chunks::<N> returns &[T; N] — a type that carries the width instead of re-checking it. That is the honest representation for a fixed-width register.

Two of the six wanted the destructuring form rather than a mechanical swap: asum_f32 and asum_f64 called chunks_exact(N) and chunks_exact(N).remainder() separately, and as_chunks returns both halves at once, so each kernel now makes one call where it made two.

The toolchain comment is rewritten, not edited

It opened # Pinned to 1.97.1, restating the version in prose beside the channel line. This file already carries the warning for exactly that failure: "A stale comment on a version pin is how the next reader learns the wrong number." A bump edits channel and leaves prose behind, so the prose now keeps only the rationale, plus an append-only bump log.

Gate

These are AVX-512 kernels, so the test suite is the real gate, not clippy:

  • cargo clippy --all-targets -- -D warningsexit 0
  • cargo fmt --all -- --check → clean
  • cargo test --lib2278 passed, 0 failed, 30 ignored

All run through bare cargo on the new pin, which is what CI does.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V


Generated by Claude Code

…it forces

Workspace-wide sweep, repo 2 of 9. ndarray's own rule is honoured: the channel
and Cargo.toml's rust-version move TOGETHER (1.97 -> 1.98).

The toolchain comment is rewritten rather than edited. It opened 'Pinned to
1.97.1', restating the version in prose beside the channel line — and this file
already carries the warning for exactly that: 'A stale comment on a version pin
is how the next reader learns the wrong number.' A bump edits channel and
leaves prose behind, so the prose now keeps only the rationale plus an
append-only bump log.

TWO 1.98 findings here, where lance-graph had one:

1. clippy::chunks_exact_to_as_chunks (new, default-on STYLE group) at 6 sites.
2. clippy::from_iter_instead_of_collect was REMOVED in 1.98, and src/lib.rs
   carried it in a crate-level allow list, which is itself an error now.

The chunks_exact change is more than lint appeasement. chunks_exact was the
right call when these buffers were 4096 and 16384 wide: the remainder is always
empty there and the runtime width check is dead weight. At the 32+96 shape —
classid plus the twelve-byte facet payload — the width is a compile-time fact,
and as_chunks::<N> returns &[T; N], a type that CARRIES the width instead of
re-checking it. That is the honest representation for a fixed-width register.

Two of the six wanted the destructuring form, not the mechanical swap: asum_f32
and asum_f64 called chunks_exact(N) AND chunks_exact(N).remainder() separately,
and as_chunks returns both halves at once, so each kernel now makes one call
where it made two.

Gate, because these are AVX-512 kernels: clippy --all-targets -D warnings exit
0, cargo fmt clean, and the full library suite at 2278 passed / 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_bec01a95-e227-4cc7-bff3-15a90c848942)

Caught by reading the PR's own check names: CI reported tests/1.97.1 and
clippy/1.97.1 AFTER the toolchain file said 1.98.1. Unlike lance-graph, whose
eleven workflows all read rust-toolchain.toml with no toolchain input, this
repo's CI pins the version explicitly via dtolnay/rust-toolchain@<version> plus
an MSRV env var. So bumping rust-toolchain.toml alone left CI still testing the
OLD toolchain — the bump would have been cosmetic where it is actually gated.

Six real pins moved: MSRV, BLAS_MSRV, the clippy matrix entry, and three
dtolnay/rust-toolchain@ steps.

Six comments also restated the version in prose and are rewritten rather than
edited, the same lesson rust-toolchain.toml already carries: a stale comment on
a version pin is how the next reader learns the wrong number. The matrix
comment now names WHERE the number lives (three places in this file, because CI
does not read the toolchain file) instead of duplicating the number itself, and
points at the bump log as the single record of why each move happened. The
comment it replaces still described the 1.94.1 bump as 'this PR'.

Verified: zero remaining 1.97.1 references in ci.yaml, and the YAML parses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGVLyRZNEKKBSfBDJfbY3V
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 5, 2026 19:56
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI
AdaWorldAPI merged commit 04ede1c into master Sep 5, 2026
20 checks passed
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