about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-22 08:02:54 +0000
committerbors <bors@rust-lang.org>2022-06-22 08:02:54 +0000
commitf9fea1737e34da3afedf4a0d35ea4866ce7f87a1 (patch)
treeffe9a216161c43c6ae7bb4535b77583d74143cbb
parentbc0bf06718774082b7cfa5d26668bdd446cebb75 (diff)
parent890fd0e3c10a7176d6e329d8161f80be06b170ad (diff)
downloadrust-f9fea1737e34da3afedf4a0d35ea4866ce7f87a1.tar.gz
rust-f9fea1737e34da3afedf4a0d35ea4866ce7f87a1.zip
Auto merge of #9030 - Serial-ATA:remove-clippy-dev-dep, r=flip1995
Remove `cargo_dev` dependency

changelog: none

Sorry about that :sweat_smile:.

r? `@flip1995`
-rw-r--r--clippy_lints/Cargo.toml3
-rw-r--r--clippy_lints/src/utils/internal_lints/metadata_collector.rs7
2 files changed, 7 insertions, 3 deletions
diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml
index eb4582b93f2..8246df01dd9 100644
--- a/clippy_lints/Cargo.toml
+++ b/clippy_lints/Cargo.toml
@@ -10,7 +10,6 @@ edition = "2021"
 
 [dependencies]
 cargo_metadata = "0.14"
-clippy_dev = { path = "../clippy_dev", optional = true }
 clippy_utils = { path = "../clippy_utils" }
 if_chain = "1.0"
 itertools = "0.10.1"
@@ -32,7 +31,7 @@ url = { version = "2.2", features = ["serde"] }
 [features]
 deny-warnings = ["clippy_utils/deny-warnings"]
 # build clippy with internal lints enabled, off by default
-internal = ["clippy_utils/internal", "serde_json", "tempfile", "clippy_dev"]
+internal = ["clippy_utils/internal", "serde_json", "tempfile"]
 
 [package.metadata.rust-analyzer]
 # This crate uses #[feature(rustc_private)]
diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
index 99e9e3275ab..f3d36938041 100644
--- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs
+++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -191,7 +191,12 @@ impl MetadataCollector {
             lints: BinaryHeap::<LintMetadata>::default(),
             applicability_info: FxHashMap::<String, ApplicabilityInfo>::default(),
             config: collect_configs(),
-            clippy_project_root: clippy_dev::clippy_project_root(),
+            clippy_project_root: std::env::current_dir()
+                .expect("failed to get current dir")
+                .ancestors()
+                .nth(1)
+                .expect("failed to get project root")
+                .to_path_buf(),
         }
     }