Skip to content

Updating package rust-version to the latest version #917

@aksh1618

Description

@aksh1618

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions