You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: Is upgrading package.rust-version within the scope of this project?
As a beginner in rust I like enabling lints to get used to idioms and avoid anti-patterns. Recently while working on a project (binary, not lib), I happened upon the use Trait as _ idiom which I decided to enforce. However the corresponding lint was only added in v1.83.
I have a function in my shell config that uses cargo-edit to upgrade all dependency crates in the current project to their latest versions. I decided to add a step to that function for upgrading the package.rust-version property to the latest stable version of rust. Looking at the help output of cargo-edit, it seemed like --rust-version was exactly what I was looking for, but looks like that's not the case:
# Update package.rust-version to latest stable version of rust
rustup update && cargo upgrade --rust-version `{rustc --version | cut -d "" -f2}` --compatible ignore # Doesn't modify cargo.toml
So I want to initiate a discussion on whether that's something this project would consider supporting.
The text was updated successfully, but these errors were encountered:
We wouldn't want to do this by default as there is a wide variety of opinions on this. I also suspect there isn't much value-add to automating this as its just a single-field to set. Even in workspaces, you can put the field in one location and then inherit it.
The MSRV resolver RFC does include approval for a rust-version = "<tbd-name-representing-currently-running-rust-toolchain>. I suspect we will wait a bit for the MSRV resolver to be out before we move forward with it. See https://rust-lang.github.io/rfcs/3537-msrv-resolver.html#cargo-publish
TL;DR: Is upgrading
package.rust-version
within the scope of this project?As a beginner in rust I like enabling lints to get used to idioms and avoid anti-patterns. Recently while working on a project (binary, not lib), I happened upon the
use Trait as _
idiom which I decided to enforce. However the corresponding lint was only added in v1.83.I have a function in my shell config that uses cargo-edit to upgrade all dependency crates in the current project to their latest versions. I decided to add a step to that function for upgrading the
package.rust-version
property to the latest stable version of rust. Looking at the help output of cargo-edit, it seemed like--rust-version
was exactly what I was looking for, but looks like that's not the case:So I want to initiate a discussion on whether that's something this project would consider supporting.
The text was updated successfully, but these errors were encountered: