Skip to content

Minimum supported version of Rust (MSVR) config and support #6097

Closed
@ghost

Description

Many lints suggest using new features in the std lib like clippy::manual_strip. I think these are great because they help people upgrade their code to take advantage of these features. However, there are many projects that support old versions of Rust that can't use these. These lints only make more work for those projects because they have to allows to fix their CI. See this recent commit in serde-yaml for example.

I'd like to add a key to clippy.toml to specify the minimum version of rust (and the stdlib) that a project supports. We can conditionally register these lints that target features not supported on that version.

I understand that eventually proper support for this will be added to Cargo and rustc to support this but at that stage we can just deprecate the setting and use the new stuff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions