mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Add test for wildcard_dependencies
This commit is contained in:
parent
bd9b09e293
commit
96af3e8360
6
tests/ui-cargo/wildcard_dependencies/fail/Cargo.toml
Normal file
6
tests/ui-cargo/wildcard_dependencies/fail/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "wildcard_dependencies"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
regex = "*"
|
3
tests/ui-cargo/wildcard_dependencies/fail/src/main.rs
Normal file
3
tests/ui-cargo/wildcard_dependencies/fail/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
#![warn(clippy::wildcard_dependencies)]
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,6 @@
|
||||
error: wildcard dependency for `regex`
|
||||
|
|
||||
= note: `-D clippy::wildcard-dependencies` implied by `-D warnings`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
6
tests/ui-cargo/wildcard_dependencies/pass/Cargo.toml
Normal file
6
tests/ui-cargo/wildcard_dependencies/pass/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "wildcard_dependencies"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
regex = "1"
|
3
tests/ui-cargo/wildcard_dependencies/pass/src/main.rs
Normal file
3
tests/ui-cargo/wildcard_dependencies/pass/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
#![warn(clippy::wildcard_dependencies)]
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user