chore: bump Rust toolchain from 1.89.0 to 1.97.1 - #120
Conversation
Moves the pinned channel from 1.89.0 (Aug 2025) to 1.97.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rust 1.97's clippy extends useless_borrows_in_formatting to catch `&` on Display-able expressions in format args. CI builds with RUSTFLAGS=-Dwarnings, so these 8 sites would fail the clippy job. Applied via `cargo clippy --fix`; removing the borrows only, no behavior change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dduugg
left a comment
There was a problem hiding this comment.
Approving. I verified the claims by running them rather than reading the diff, and they hold up.
Verified
RUSTFLAGS=-Dwarnings cargo clippy --all-targets --all-featuresandcargo fmt --all -- --checkpass clean at the head (a203f39).- Checked out the bump-only commit (d03f8d8) and reran clippy: it fails with exactly the
useless_borrows_in_formattingerrors described (validator.rs:250, runner.rs:92/94/101/107/253), citing therust-1.97.0clippy docs anchor. The "the fix commit is required" framing is accurate. - Ran clippy under the outgoing 1.89.0 against those same sites on base
main: zero hits. So the lint genuinely widened between 1.89 and 1.97 — these were not pre-existing warnings. - All 8
&removals are behavior-neutral. Each is either&Cow<str>->Cow<str>fromto_string_lossy(), or a borrow of a local temporary (&messages,&cache_dir.display()) not reused afterward.Displayforwards through references at any depth, and the underlying calls only borrowself, so there is no move or reuse hazard. - No
rust-versioninCargo.toml; nodist-workspace.toml, cargo-dist config,clippy.toml, or dependabot config anywhere in the repo. Nothing else referenced a Rust version that needed to move. - The
aarch64-unknown-linux-gnuomission fromtargetsis genuinely pre-existing, and thecrossexplanation checks out:upload-linux-binrunscargo install crossthencross build --target aarch64-unknown-linux-gnu, which supplies its own target support independent of rustup's list. audit.ymlalready setsRUSTUP_TOOLCHAIN=stablewith a comment about exactly this drift, so it is unaffected.
Nothing blocking, and no nits in the code itself. Two small notes inline.
| @@ -1,4 +1,4 @@ | |||
| [toolchain] | |||
| channel = "1.89.0" | |||
| channel = "1.97.1" | |||
There was a problem hiding this comment.
Two notes on this line, neither blocking.
1.97.1 is now one release behind stable. 1.98.0 shipped 2026-08-18, so the PR description's "1.97.1, an eight-release jump" is right but "current stable" language elsewhere in this series has already aged. Pinning one behind stable is a perfectly defensible choice — just flagging that the pin is no longer the newest if the intent was to land on current.
Commit-order convention differs from the sibling PR. rubyatscale/pks#57's toolchain bump (#52) deliberately lands the lint fixes first so every commit passes clippy independently and git bisect never lands on a red commit. This PR lands the bump first and notes d03f8d8 fails clippy on its own. Same author, same day, same lint, opposite call. Both are reasonable in isolation; worth picking one convention across the two repos so the next bump doesn't have to re-decide. (You already offered to squash — that would resolve it here.)
Summary
rust-toolchain.tomlfrom 1.89.0 (Aug 2025) to 1.97.1, an eight-release jump.Context
Cargo.tomldeclares norust-version, so this repo has no MSRV to bump.rust-toolchain.tomlgoverns builds in this repo only.Reviewer guidance
Two commits, deliberately split so the substantive change is a one-liner:
rust-toolchain.toml.cargo clippy --fix; skimmable.Rust 1.97 widens clippy's
useless_borrows_in_formattingto flag&on Display-able expressions in format arguments. CI builds withRUSTFLAGS=-Dwarnings, so these became hard errors. Every fix removes a borrow and nothing else —&Cow<str>andCow<str>have identicalDisplaybehavior, so there is no behavioral change and no new test surface.Affected:
src/cli.rs,src/runner.rs(5 sites),src/ownership/validator.rs,tests/common/mod.rs.Notes
git bisectlanding exactly on that commit would see clippy failures. Happy to squash if preferred.rust-toolchain.tomlomitsaarch64-unknown-linux-gnufromtargets, though CI cross-builds it.crosssupplies its own targets, so it works today.🤖 Generated with Claude Code