rust-version and rust-toolchain.toml are frequently out-of-sync #1712

Closed
opened 2026-02-05 01:32:44 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @zacknewman on GitHub (Sep 21, 2023).

What is the point of specifying the minimum rustc version via rust-version in Cargo.toml if you are going to force a specific toolchain via rust-toolchain.toml? Having both means having to keep track of two separate things that frequently go out of sync; and worse, if one updates rust-version such that it's newer than what is in rust-toolchain.toml, one will needlessly download the specified toolchain just for the compiler to fail with a message that the toolchain is not new enough. Seems to me that it's better to remove rust-version from Cargo.toml or allow newer toolchains to be used and remove rust-toolchain.toml instead. I realize that if you have to go back to using nightly, then rust-toolchain.toml is your only option.

Originally created by @zacknewman on GitHub (Sep 21, 2023). What is the point of specifying the minimum `rustc` version via `rust-version` in `Cargo.toml` if you are going to force a specific toolchain via `rust-toolchain.toml`? Having both means having to keep track of two separate things that frequently go out of sync; and worse, if one updates `rust-version` such that it's newer than what is in `rust-toolchain.toml`, one will needlessly download the specified toolchain just for the compiler to fail with a message that the toolchain is not new enough. Seems to me that it's better to remove `rust-version` from `Cargo.toml` or allow newer toolchains to be used and remove `rust-toolchain.toml` instead. I realize that if you have to go back to using `nightly`, then `rust-toolchain.toml` is your only option.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1712