Skip to content

fix: make the rust-toolchain.toml comment match what it actually does - #345

Open
MaximeGaudin wants to merge 1 commit into
mainfrom
fix/issue-223-pin-toolchain
Open

fix: make the rust-toolchain.toml comment match what it actually does#345
MaximeGaudin wants to merge 1 commit into
mainfrom
fix/issue-223-pin-toolchain

Conversation

@MaximeGaudin

Copy link
Copy Markdown
Owner

Summary

  • The file's comment claimed "Pin the Rust toolchain so every developer and CI use the same rustc/clippy", but channel = "stable" is a floating channel, not a pin.
  • Rewrote the comment to state what the file actually does: it selects the current stable channel (unpinned, resolved per machine) with rustfmt and clippy.

The issue offered "pin to a real version or correct the comment". Pinning to a specific version is a toolchain-policy decision (which version, and how it interacts with CI — see below) that I left to the maintainer; this PR does the unambiguous half.

Finding worth a follow-up: the file currently overrides CI's toolchain selection

Verified locally with rustup: the toolchain file takes precedence over rustup default (rustup precedence: RUSTUP_TOOLCHAIN > directory override > toolchain file > default). The dtolnay/rust-toolchain action installs its @rev toolchain and sets it with rustup default — which this file then overrides, because channel = "stable" resolves to the current stable. Consequence: in CI, every job — including the msrv job that intends 1.95.0 — actually runs on whatever stable is current at run time, so the MSRV floor is not being tested. (Repro: in a dir with this file present, rustup default 1.95.0 + rustc --version reports "overridden by rust-toolchain.toml" and uses stable.)

If the maintainer wants, the clean follow-up is to drop the channel line (leaving components/profile), which lets each CI job's @rev take effect as intended — at the cost of local developers using their own default toolchain instead of a forced stable.

Fixes #223

Test plan

  • Comment-only change; no code affected, nothing to run (verified rustup precedence empirically before writing the note).
  • CI green on the PR

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.

rust-toolchain.toml's 'stable' channel does not actually pin the toolchain, despite the file's own comment

1 participant