Skip to content

Lint for redundant feature names #15580

Description

@epage

What it does

Checks for feature names with prefix use-, with- or suffix -support

See also https://rust-lang.github.io/rust-clippy/master/index.html?groups=cargo#/redundant_feature_names?groups=cargo

Advantage

These prefixes and suffixes have no significant meaning.

Drawbacks

No response

Example

[features]
default = ["use-abc", "with-def", "ghi-support"]
use-abc = []  // redundant
with-def = []   // redundant
ghi-support = []   // redundant

Could be written as:

[features]
default = ["abc", "def", "ghi"]
abc = []
def = []
ghi = []

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-new-lintArea: new lintS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions