The documentation says about rust-toolchain.toml:
Some projects find themselves 'pinned' to a specific release of Rust and want
this information reflected in their source repository. This is most often the
case for nightly-only software that pins to a revision from the release
archives.In these cases the toolchain can be named in the project's directory in a file
calledrust-toolchain.tomlorrust-toolchain.
However, the toolchain file allows you to specify non-versioned (or without -<date>) channel versions such as channel = "stable".
If I understand it correctly that defeats the purpose of the rust-toolchain.toml file to pin to a specific version because it will then use whatever stable version you already have installed (without updating it), even if that is months or years old.
So should it be considered a code smell in the majority of cases when channel has a non-versioned value?
In that case, would it make sense if the rustup documentation highlighted this, and maybe even Clippy linted this if possible? (I could create an issue, and in the case of rustup maybe also a PR in that case)
This pattern does not seem that uncommon (GitHub search for 'stable', GitHub search for 'nightly').
1 post - 1 participant

