Auto merge of #12146 - kristof-mattei:multiple-crate-versions-with-dashes, r=Manishearth

Fix [`multiple_crate_versions`] to correctly normalize package names to avoid missing the local one

Fixes #12145

changelog: [`multiple_crate_versions`]: correctly normalize package name
This commit is contained in:
bors 2024-01-17 23:00:36 +00:00
commit bb2d497364
4 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,6 @@
error: multiple versions for dependency `winapi`: 0.2.8, 0.3.9
|
= note: `-D clippy::multiple-crate-versions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::multiple_crate_versions)]`
error: could not compile `multiple-crate-versions` (bin "multiple-crate-versions") due to 1 previous error

View file

@ -0,0 +1,14 @@
# Should not lint for dev or build dependencies. See issue 5041.
[package]
# purposefully separated by - instead of _
name = "multiple-crate-versions"
version = "0.1.0"
publish = false
[workspace]
# One of the versions of winapi is only a dev dependency: allowed
[dependencies]
winapi = "0.2"
ansi_term = "=0.11.0"

View file

@ -0,0 +1,3 @@
#![warn(clippy::multiple_crate_versions)]
fn main() {}