Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5769c21

Browse files
chore: negative test for multiple crate versions not working when name contains dashes
1 parent a71211d commit 5769c21

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
error: multiple versions for dependency `winapi`: 0.2.8, 0.3.9
2+
|
3+
= note: `-D clippy::multiple-crate-versions` implied by `-D warnings`
4+
= help: to override `-D warnings` add `#[allow(clippy::multiple_crate_versions)]`
5+
6+
error: could not compile `multiple-crate-versions-with-dashes` (bin "multiple-crate-versions-with-dashes") due to 1 previous error
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Should not lint for dev or build dependencies. See issue 5041.
2+
3+
[package]
4+
name = "multiple-crate-versions-with-dashes"
5+
version = "0.1.0"
6+
publish = false
7+
8+
[workspace]
9+
10+
# One of the versions of winapi is only a dev dependency: allowed
11+
[dependencies]
12+
winapi = "0.2"
13+
ansi_term = "=0.11.0"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![warn(clippy::multiple_crate_versions)]
2+
3+
fn main() {}

0 commit comments

Comments
 (0)