Skip to content

docs: say how the pinned toolchain goes wrong quietly - #25

Merged
rldyourmnd merged 1 commit into
mainfrom
docs/the-toolchain-shadow
Aug 25, 2026
Merged

docs: say how the pinned toolchain goes wrong quietly#25
rldyourmnd merged 1 commit into
mainfrom
docs/the-toolchain-shadow

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

docs: say how the pinned toolchain goes wrong quietly

rust-toolchain.toml pins the compiler and rustup honours it, but only if the
cargo being run is rustup's shim. A cargo installed elsewhere and earlier on
PATH does not read that file, and if rustdoc resolves to a different release
than cargo does, the workspace compiles with one compiler while its doctests
run under another:

error[E0514]: found crate `serde` compiled by an incompatible version of rustc

Nothing is wrong with the code, and the message does not say so. CONTRIBUTING.md
now names the failure, gives the two commands that show it, and says what to do.

Rendered from NDDev-it-com/setup-systems@cf18ed1.

https://claude.ai/code/session_011eFMKoUdWcc7Aw9vtMxH2A

`rust-toolchain.toml` pins the compiler and rustup honours it, but only if the
`cargo` being run is rustup's shim. A `cargo` installed elsewhere and earlier on
`PATH` does not read that file, and if `rustdoc` resolves to a different release
than `cargo` does, the workspace compiles with one compiler while its doctests
run under another:

    error[E0514]: found crate `serde` compiled by an incompatible version of rustc

Nothing is wrong with the code, and the message does not say so. CONTRIBUTING.md
now names the failure, gives the two commands that show it, and says what to do.
@rldyourmnd
rldyourmnd merged commit d068a2a into main Aug 25, 2026
24 checks passed
@rldyourmnd
rldyourmnd deleted the docs/the-toolchain-shadow branch August 25, 2026 19:39
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.

1 participant