Skip to content

Add lint to detect when the rust-version field is not defined #14064

Closed as not planned
@sorairolake

Description

@sorairolake

What it does

Checks to see if the rust-version field is defined in Cargo.toml.

Advantage

The MSRV-aware resolver takes this field into account when picking dependencies if it is defined. If this field is defined, the toil is reduced for maintainers to support older toolchains by not needing to manually select older versions for each dependency.

Drawbacks

The MSRV-aware resolver has been stabilized since Rust 1.84.0.

Example

[package]
# ...

Could be written as:

[package]
# ...
rust-version = "1.56"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions