Skip to content

multiple_crate_versions lint detects dev dependencies also #5041

@tkaitchuck

Description

@tkaitchuck

The stated reason for the multiple_crate_versions check is

This bloats the size of targets, and can lead to confusing error messages when structs or traits are used interchangeably between different versions of a crate.

However this error triggers when multiple crates declare a dev dependency on the same target also. For example:

warning: multiple versions for dependency `syn`: 0.15.44, 1.0.11
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions

However because this is a dev dependency it should not cause any of the issues mentioned above. It would be good to exclude dev and test dependencies from this check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesT-cargoType: cargo related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions