diff --git a/Cargo.toml b/Cargo.toml index ce609bb1a..868f21c1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ rustc_tools_util = { version = "0.1.1", path = "rustc_tools_util"} [dev-dependencies] clippy_dev = { version = "0.0.1", path = "clippy_dev" } -cargo_metadata = "0.6.2" +cargo_metadata = "0.7.1" compiletest_rs = "0.3.18" lazy_static = "1.0" serde_derive = "1.0" diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index 6c7f2d255..592ad5cde 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -17,7 +17,7 @@ keywords = ["clippy", "lint", "plugin"] edition = "2018" [dependencies] -cargo_metadata = "0.6.2" +cargo_metadata = "0.7.1" itertools = "0.8" lazy_static = "1.0.2" matches = "0.1.7" diff --git a/clippy_lints/src/cargo_common_metadata.rs b/clippy_lints/src/cargo_common_metadata.rs index 70ea38751..c60d10cd0 100644 --- a/clippy_lints/src/cargo_common_metadata.rs +++ b/clippy_lints/src/cargo_common_metadata.rs @@ -66,7 +66,7 @@ impl LintPass for Pass { impl EarlyLintPass for Pass { fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &Crate) { - let metadata = if let Ok(metadata) = cargo_metadata::metadata_deps(None, true) { + let metadata = if let Ok(metadata) = cargo_metadata::MetadataCommand::new().no_deps().exec() { metadata } else { warning(cx, "could not read cargo metadata"); diff --git a/clippy_lints/src/multiple_crate_versions.rs b/clippy_lints/src/multiple_crate_versions.rs index 073d3857c..6a042fa8c 100644 --- a/clippy_lints/src/multiple_crate_versions.rs +++ b/clippy_lints/src/multiple_crate_versions.rs @@ -41,7 +41,7 @@ impl LintPass for Pass { impl EarlyLintPass for Pass { fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &Crate) { - let metadata = if let Ok(metadata) = cargo_metadata::metadata_deps(None, true) { + let metadata = if let Ok(metadata) = cargo_metadata::MetadataCommand::new().exec() { metadata } else { span_lint(cx, MULTIPLE_CRATE_VERSIONS, DUMMY_SP, "could not read cargo metadata"); diff --git a/clippy_lints/src/wildcard_dependencies.rs b/clippy_lints/src/wildcard_dependencies.rs index e3c352862..fb88b1371 100644 --- a/clippy_lints/src/wildcard_dependencies.rs +++ b/clippy_lints/src/wildcard_dependencies.rs @@ -37,7 +37,7 @@ impl LintPass for Pass { impl EarlyLintPass for Pass { fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &Crate) { - let metadata = if let Ok(metadata) = cargo_metadata::metadata(None) { + let metadata = if let Ok(metadata) = cargo_metadata::MetadataCommand::new().no_deps().exec() { metadata } else { span_lint(cx, WILDCARD_DEPENDENCIES, DUMMY_SP, "could not read cargo metadata");