about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2025-03-23 07:45:29 +0100
committerLukas Wirth <lukastw97@gmail.com>2025-03-23 08:08:17 +0100
commit9b1924df898ba81eeb7ea72da31ff986b3986b3e (patch)
treea73821438a6b87c473e9ee2ba33fb48b58a7f575
parent2aa893313adadfad397f5899469417ba8c9e0853 (diff)
downloadrust-9b1924df898ba81eeb7ea72da31ff986b3986b3e.tar.gz
rust-9b1924df898ba81eeb7ea72da31ff986b3986b3e.zip
chore: Remove unused dependencies
-rw-r--r--src/tools/rust-analyzer/Cargo.lock35
-rw-r--r--src/tools/rust-analyzer/crates/base-db/Cargo.toml3
-rw-r--r--src/tools/rust-analyzer/crates/hir-def/Cargo.toml3
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/Cargo.toml2
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/Cargo.toml2
-rw-r--r--src/tools/rust-analyzer/crates/ide-db/Cargo.toml1
-rw-r--r--src/tools/rust-analyzer/crates/ide-ssr/Cargo.toml4
-rw-r--r--src/tools/rust-analyzer/crates/load-cargo/Cargo.toml1
-rw-r--r--src/tools/rust-analyzer/crates/mbe/Cargo.toml5
-rw-r--r--src/tools/rust-analyzer/crates/proc-macro-srv-cli/src/main.rs1
-rw-r--r--src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml5
-rw-r--r--src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs1
-rw-r--r--src/tools/rust-analyzer/crates/profile/Cargo.toml4
-rw-r--r--src/tools/rust-analyzer/crates/query-group-macro/Cargo.toml3
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml3
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics.rs48
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs7
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs2
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs3
-rw-r--r--src/tools/rust-analyzer/crates/stdx/Cargo.toml4
-rw-r--r--src/tools/rust-analyzer/crates/syntax-bridge/Cargo.toml1
-rw-r--r--src/tools/rust-analyzer/crates/syntax/Cargo.toml2
-rw-r--r--src/tools/rust-analyzer/crates/test-utils/Cargo.toml1
23 files changed, 45 insertions, 96 deletions
diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock
index 54cc9d1c680..4310cfc04a8 100644
--- a/src/tools/rust-analyzer/Cargo.lock
+++ b/src/tools/rust-analyzer/Cargo.lock
@@ -1,6 +1,6 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
-version = 3
+version = 4
 
 [[package]]
 name = "addr2line"
@@ -33,12 +33,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
 
 [[package]]
-name = "always-assert"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1078fa1ce1e34b1872d8611ad921196d76bdd7027e949fbe31231abde201892"
-
-[[package]]
 name = "anyhow"
 version = "1.0.97"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -85,13 +79,11 @@ dependencies = [
  "dashmap 5.5.3",
  "intern",
  "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "lz4_flex",
  "query-group-macro",
  "rustc-hash 2.1.1",
  "salsa",
  "semver",
  "span",
- "stdx",
  "syntax",
  "tracing",
  "triomphe",
@@ -638,12 +630,10 @@ dependencies = [
  "bitflags 2.9.0",
  "cfg",
  "cov-mark",
- "dashmap 5.5.3",
  "drop_bomb",
  "either",
  "expect-test",
  "fst",
- "hashbrown 0.14.5",
  "hir-expand",
  "indexmap",
  "intern",
@@ -652,7 +642,6 @@ dependencies = [
  "mbe",
  "query-group-macro",
  "ra-ap-rustc_abi",
- "ra-ap-rustc_hashes",
  "ra-ap-rustc_parse_format",
  "rustc-hash 2.1.1",
  "rustc_apfloat",
@@ -679,10 +668,8 @@ dependencies = [
  "cov-mark",
  "either",
  "expect-test",
- "hashbrown 0.14.5",
  "intern",
  "itertools",
- "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "mbe",
  "parser",
  "query-group-macro",
@@ -710,7 +697,6 @@ dependencies = [
  "chalk-recursive",
  "chalk-solve",
  "cov-mark",
- "dashmap 5.5.3",
  "either",
  "ena",
  "expect-test",
@@ -720,7 +706,6 @@ dependencies = [
  "intern",
  "itertools",
  "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "nohash-hasher",
  "oorandom",
  "project-model",
  "query-group-macro",
@@ -951,7 +936,6 @@ dependencies = [
  "bitflags 2.9.0",
  "cov-mark",
  "crossbeam-channel",
- "dashmap 5.5.3",
  "either",
  "expect-test",
  "fst",
@@ -1006,9 +990,7 @@ dependencies = [
  "hir",
  "ide-db",
  "itertools",
- "nohash-hasher",
  "parser",
- "stdx",
  "syntax",
  "test-fixture",
  "test-utils",
@@ -1206,7 +1188,6 @@ dependencies = [
  "ide-db",
  "intern",
  "itertools",
- "paths",
  "proc-macro-api",
  "project-model",
  "span",
@@ -1285,12 +1266,6 @@ dependencies = [
 ]
 
 [[package]]
-name = "lz4_flex"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
-
-[[package]]
 name = "matchers"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1316,7 +1291,6 @@ dependencies = [
  "syntax",
  "syntax-bridge",
  "test-utils",
- "tracing",
  "tt",
 ]
 
@@ -1644,7 +1618,6 @@ dependencies = [
  "proc-macro-test",
  "ra-ap-rustc_lexer",
  "span",
- "stdx",
  "syntax-bridge",
  "tt",
 ]
@@ -1767,7 +1740,6 @@ name = "query-group-macro"
 version = "0.0.0"
 dependencies = [
  "expect-test",
- "heck",
  "proc-macro2",
  "quote",
  "salsa",
@@ -1960,7 +1932,6 @@ dependencies = [
 name = "rust-analyzer"
 version = "0.0.0"
 dependencies = [
- "always-assert",
  "anyhow",
  "base64",
  "cargo_metadata",
@@ -2292,10 +2263,8 @@ dependencies = [
 name = "syntax"
 version = "0.0.0"
 dependencies = [
- "cov-mark",
  "either",
  "expect-test",
- "indexmap",
  "itertools",
  "parser",
  "ra-ap-rustc_lexer",
@@ -2321,7 +2290,6 @@ dependencies = [
  "stdx",
  "syntax",
  "test-utils",
- "tracing",
  "tt",
 ]
 
@@ -2357,7 +2325,6 @@ dependencies = [
  "rustc-hash 2.1.1",
  "stdx",
  "text-size",
- "tracing",
 ]
 
 [[package]]
diff --git a/src/tools/rust-analyzer/crates/base-db/Cargo.toml b/src/tools/rust-analyzer/crates/base-db/Cargo.toml
index 4780d5191be..441434504c2 100644
--- a/src/tools/rust-analyzer/crates/base-db/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/base-db/Cargo.toml
@@ -12,8 +12,6 @@ rust-version.workspace = true
 [lib]
 
 [dependencies]
-lz4_flex = { version = "0.11", default-features = false }
-
 la-arena.workspace = true
 dashmap.workspace = true
 salsa.workspace = true
@@ -25,7 +23,6 @@ tracing.workspace = true
 
 # local deps
 cfg.workspace = true
-stdx.workspace = true
 syntax.workspace = true
 vfs.workspace = true
 span.workspace = true
diff --git a/src/tools/rust-analyzer/crates/hir-def/Cargo.toml b/src/tools/rust-analyzer/crates/hir-def/Cargo.toml
index 1b1d430ffdf..628a78cdeaf 100644
--- a/src/tools/rust-analyzer/crates/hir-def/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/hir-def/Cargo.toml
@@ -15,7 +15,6 @@ rust-version.workspace = true
 arrayvec.workspace = true
 bitflags.workspace = true
 cov-mark = "2.0.0-pre.1"
-dashmap.workspace = true
 drop_bomb = "0.1.5"
 either.workspace = true
 fst = { version = "0.4.7", default-features = false }
@@ -25,14 +24,12 @@ la-arena.workspace = true
 rustc-hash.workspace = true
 tracing.workspace = true
 smallvec.workspace = true
-hashbrown.workspace = true
 triomphe.workspace = true
 rustc_apfloat = "0.2.0"
 text-size.workspace = true
 salsa.workspace = true
 query-group.workspace = true
 
-ra-ap-rustc_hashes.workspace = true
 ra-ap-rustc_parse_format.workspace = true
 ra-ap-rustc_abi.workspace = true
 
diff --git a/src/tools/rust-analyzer/crates/hir-expand/Cargo.toml b/src/tools/rust-analyzer/crates/hir-expand/Cargo.toml
index 607199a6244..5884c0a5a4a 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/hir-expand/Cargo.toml
@@ -16,9 +16,7 @@ cov-mark = "2.0.0-pre.1"
 tracing.workspace = true
 either.workspace = true
 rustc-hash.workspace = true
-la-arena.workspace = true
 itertools.workspace = true
-hashbrown.workspace = true
 smallvec.workspace = true
 triomphe.workspace = true
 query-group.workspace = true
diff --git a/src/tools/rust-analyzer/crates/hir-ty/Cargo.toml b/src/tools/rust-analyzer/crates/hir-ty/Cargo.toml
index 30074105331..49d0c5e58f5 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/hir-ty/Cargo.toml
@@ -29,9 +29,7 @@ chalk-recursive.workspace = true
 chalk-derive.workspace = true
 la-arena.workspace = true
 triomphe.workspace = true
-nohash-hasher.workspace = true
 typed-arena = "2.0.1"
-dashmap.workspace = true
 indexmap.workspace = true
 rustc_apfloat = "0.2.0"
 query-group.workspace = true
diff --git a/src/tools/rust-analyzer/crates/ide-db/Cargo.toml b/src/tools/rust-analyzer/crates/ide-db/Cargo.toml
index 84855652338..485a72050fc 100644
--- a/src/tools/rust-analyzer/crates/ide-db/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/ide-db/Cargo.toml
@@ -15,7 +15,6 @@ rust-version.workspace = true
 cov-mark = "2.0.0-pre.1"
 crossbeam-channel.workspace = true
 tracing.workspace = true
-dashmap.workspace = true
 rayon.workspace = true
 fst = { version = "0.4.7", default-features = false }
 rustc-hash.workspace = true
diff --git a/src/tools/rust-analyzer/crates/ide-ssr/Cargo.toml b/src/tools/rust-analyzer/crates/ide-ssr/Cargo.toml
index fa75e5a4214..39a71c1d655 100644
--- a/src/tools/rust-analyzer/crates/ide-ssr/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/ide-ssr/Cargo.toml
@@ -14,18 +14,16 @@ rust-version.workspace = true
 [dependencies]
 cov-mark = "2.0.0-pre.1"
 itertools.workspace = true
-triomphe.workspace = true
-nohash-hasher.workspace = true
 
 # local deps
 hir.workspace = true
 ide-db.workspace = true
 parser.workspace = true
-stdx.workspace = true
 syntax.workspace = true
 
 [dev-dependencies]
 expect-test = "1.4.0"
+triomphe.workspace = true
 
 # local deps
 test-utils.workspace = true
diff --git a/src/tools/rust-analyzer/crates/load-cargo/Cargo.toml b/src/tools/rust-analyzer/crates/load-cargo/Cargo.toml
index 23fd50a0564..91b012e0507 100644
--- a/src/tools/rust-analyzer/crates/load-cargo/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/load-cargo/Cargo.toml
@@ -21,7 +21,6 @@ tracing.workspace = true
 
 hir-expand.workspace = true
 ide-db.workspace = true
-paths.workspace = true
 proc-macro-api.workspace = true
 project-model.workspace = true
 span.workspace = true
diff --git a/src/tools/rust-analyzer/crates/mbe/Cargo.toml b/src/tools/rust-analyzer/crates/mbe/Cargo.toml
index e6fbb298ebd..6ee505e64ef 100644
--- a/src/tools/rust-analyzer/crates/mbe/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/mbe/Cargo.toml
@@ -15,12 +15,10 @@ rust-version.workspace = true
 cov-mark = "2.0.0-pre.1"
 rustc-hash.workspace = true
 smallvec.workspace = true
-tracing.workspace = true
 arrayvec.workspace = true
 ra-ap-rustc_lexer.workspace = true
 
 # local deps
-syntax.workspace = true
 parser.workspace = true
 tt.workspace = true
 stdx.workspace = true
@@ -31,9 +29,10 @@ syntax-bridge.workspace = true
 [dev-dependencies]
 test-utils.workspace = true
 expect-test.workspace = true
+syntax.workspace = true
 
 [features]
-in-rust-tree = ["parser/in-rust-tree", "tt/in-rust-tree", "syntax/in-rust-tree"]
+in-rust-tree = ["parser/in-rust-tree", "tt/in-rust-tree"]
 
 [lints]
 workspace = true
diff --git a/src/tools/rust-analyzer/crates/proc-macro-srv-cli/src/main.rs b/src/tools/rust-analyzer/crates/proc-macro-srv-cli/src/main.rs
index 0e6b18ecaef..c47ed053254 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-srv-cli/src/main.rs
+++ b/src/tools/rust-analyzer/crates/proc-macro-srv-cli/src/main.rs
@@ -1,6 +1,7 @@
 //! A standalone binary for `proc-macro-srv`.
 //! Driver for proc macro server
 #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+#![cfg_attr(not(feature = "sysroot-abi"), allow(unused_crate_dependencies))]
 #![allow(clippy::print_stderr)]
 
 #[cfg(feature = "in-rust-tree")]
diff --git a/src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml b/src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml
index d3b56b402ea..8fd675d0d31 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml
@@ -13,11 +13,9 @@ rust-version.workspace = true
 
 [dependencies]
 object.workspace = true
-libc.workspace = true
 libloading.workspace = true
 memmap2.workspace = true
 
-stdx.workspace = true
 tt.workspace = true
 syntax-bridge.workspace = true
 paths.workspace = true
@@ -27,6 +25,9 @@ intern.workspace = true
 
 ra-ap-rustc_lexer.workspace = true
 
+[target.'cfg(unix)'.dependencies]
+libc.workspace = true
+
 [dev-dependencies]
 expect-test.workspace = true
 
diff --git a/src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs b/src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs
index 4f817b6bc0a..2623b2d45cd 100644
--- a/src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs
@@ -11,6 +11,7 @@
 //!   rustc rather than `unstable`. (Although in general ABI compatibility is still an issue)…
 
 #![cfg(any(feature = "sysroot-abi", rust_analyzer))]
+#![cfg_attr(not(feature = "sysroot-abi"), allow(unused_crate_dependencies))]
 #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
 #![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)]
 #![allow(unreachable_pub, internal_features, clippy::disallowed_types, clippy::print_stderr)]
diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml
index 9384fe26558..376737cec67 100644
--- a/src/tools/rust-analyzer/crates/profile/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml
@@ -13,12 +13,14 @@ rust-version.workspace = true
 
 [dependencies]
 cfg-if = "1.0.0"
-libc.workspace = true
 jemalloc-ctl = { version = "0.5.0", package = "tikv-jemalloc-ctl", optional = true }
 
 [target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
 perf-event = "=0.4.7"
 
+[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies]
+libc.workspace = true
+
 [target.'cfg(windows)'.dependencies]
 windows-sys = { version = "0.59", features = [
     "Win32_System_Threading",
diff --git a/src/tools/rust-analyzer/crates/query-group-macro/Cargo.toml b/src/tools/rust-analyzer/crates/query-group-macro/Cargo.toml
index 99d1bf7e2c7..116028b5ba6 100644
--- a/src/tools/rust-analyzer/crates/query-group-macro/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/query-group-macro/Cargo.toml
@@ -13,11 +13,10 @@ rust-version.workspace = true
 proc-macro = true
 
 [dependencies]
-heck = "0.5.0"
 proc-macro2 = "1.0"
 quote = "1.0"
 syn = { version = "2.0", features = ["full", "extra-traits"] }
-salsa.workspace = true
 
 [dev-dependencies]
 expect-test = "1.5.0"
+salsa.workspace = true
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
index 9d30c5d38eb..d47074198fd 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
@@ -47,7 +47,6 @@ tracing-tree.workspace = true
 triomphe.workspace = true
 toml = "0.8.8"
 nohash-hasher.workspace = true
-always-assert = "0.2.0"
 walkdir = "2.3.2"
 semver.workspace = true
 memchr = "2.7.1"
@@ -95,9 +94,7 @@ syntax-bridge.workspace = true
 [features]
 jemalloc = ["jemallocator", "profile/jemalloc"]
 force-always-assert = ["stdx/force-always-assert"]
-sysroot-abi = []
 in-rust-tree = [
-  "sysroot-abi",
   "syntax/in-rust-tree",
   "parser/in-rust-tree",
   "hir/in-rust-tree",
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics.rs
index 0b51dd87fea..a09d96d1629 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics.rs
@@ -7,7 +7,6 @@ use cargo_metadata::PackageId;
 use ide::FileId;
 use ide_db::FxHashMap;
 use itertools::Itertools;
-use nohash_hasher::{IntMap, IntSet};
 use rustc_hash::FxHashSet;
 use stdx::iter_eq_by;
 use triomphe::Arc;
@@ -15,7 +14,7 @@ use triomphe::Arc;
 use crate::{global_state::GlobalStateSnapshot, lsp, lsp_ext, main_loop::DiagnosticsTaskKind};
 
 pub(crate) type CheckFixes =
-    Arc<IntMap<usize, FxHashMap<Option<Arc<PackageId>>, IntMap<FileId, Vec<Fix>>>>>;
+    Arc<Vec<FxHashMap<Option<Arc<PackageId>>, FxHashMap<FileId, Vec<Fix>>>>>;
 
 #[derive(Debug, Default, Clone)]
 pub struct DiagnosticsMapConfig {
@@ -29,16 +28,16 @@ pub(crate) type DiagnosticsGeneration = usize;
 
 #[derive(Debug, Default, Clone)]
 pub(crate) struct DiagnosticCollection {
-    // FIXME: should be IntMap<FileId, Vec<ra_id::Diagnostic>>
-    pub(crate) native_syntax: IntMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
-    pub(crate) native_semantic: IntMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
+    // FIXME: should be FxHashMap<FileId, Vec<ra_id::Diagnostic>>
+    pub(crate) native_syntax:
+        FxHashMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
+    pub(crate) native_semantic:
+        FxHashMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
     // FIXME: should be Vec<flycheck::Diagnostic>
-    pub(crate) check: IntMap<
-        usize,
-        FxHashMap<Option<Arc<PackageId>>, IntMap<FileId, Vec<lsp_types::Diagnostic>>>,
-    >,
+    pub(crate) check:
+        Vec<FxHashMap<Option<Arc<PackageId>>, FxHashMap<FileId, Vec<lsp_types::Diagnostic>>>>,
     pub(crate) check_fixes: CheckFixes,
-    changes: IntSet<FileId>,
+    changes: FxHashSet<FileId>,
     /// Counter for supplying a new generation number for diagnostics.
     /// This is used to keep track of when to clear the diagnostics for a given file as we compute
     /// diagnostics on multiple worker threads simultaneously which may result in multiple diagnostics
@@ -55,11 +54,11 @@ pub(crate) struct Fix {
 
 impl DiagnosticCollection {
     pub(crate) fn clear_check(&mut self, flycheck_id: usize) {
-        let Some(check) = self.check.get_mut(&flycheck_id) else {
+        let Some(check) = self.check.get_mut(flycheck_id) else {
             return;
         };
         self.changes.extend(check.drain().flat_map(|(_, v)| v.into_keys()));
-        if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(&flycheck_id) {
+        if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(flycheck_id) {
             fixes.clear();
         }
     }
@@ -67,7 +66,7 @@ impl DiagnosticCollection {
     pub(crate) fn clear_check_all(&mut self) {
         Arc::make_mut(&mut self.check_fixes).clear();
         self.changes.extend(
-            self.check.values_mut().flat_map(|it| it.drain().flat_map(|(_, v)| v.into_keys())),
+            self.check.iter_mut().flat_map(|it| it.drain().flat_map(|(_, v)| v.into_keys())),
         )
     }
 
@@ -76,14 +75,14 @@ impl DiagnosticCollection {
         flycheck_id: usize,
         package_id: Arc<PackageId>,
     ) {
-        let Some(check) = self.check.get_mut(&flycheck_id) else {
+        let Some(check) = self.check.get_mut(flycheck_id) else {
             return;
         };
         let package_id = Some(package_id);
         if let Some(checks) = check.remove(&package_id) {
             self.changes.extend(checks.into_keys());
         }
-        if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(&flycheck_id) {
+        if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(flycheck_id) {
             fixes.remove(&package_id);
         }
     }
@@ -102,10 +101,10 @@ impl DiagnosticCollection {
         diagnostic: lsp_types::Diagnostic,
         fix: Option<Box<Fix>>,
     ) {
-        let diagnostics = self
-            .check
-            .entry(flycheck_id)
-            .or_default()
+        if self.check.len() <= flycheck_id {
+            self.check.resize_with(flycheck_id + 1, Default::default);
+        }
+        let diagnostics = self.check[flycheck_id]
             .entry(package_id.clone())
             .or_default()
             .entry(file_id)
@@ -118,9 +117,10 @@ impl DiagnosticCollection {
 
         if let Some(fix) = fix {
             let check_fixes = Arc::make_mut(&mut self.check_fixes);
-            check_fixes
-                .entry(flycheck_id)
-                .or_default()
+            if check_fixes.len() <= flycheck_id {
+                check_fixes.resize_with(flycheck_id + 1, Default::default);
+            }
+            check_fixes[flycheck_id]
                 .entry(package_id.clone())
                 .or_default()
                 .entry(file_id)
@@ -176,14 +176,14 @@ impl DiagnosticCollection {
         let native_semantic = self.native_semantic.get(&file_id).into_iter().flat_map(|(_, d)| d);
         let check = self
             .check
-            .values()
+            .iter()
             .flat_map(|it| it.values())
             .filter_map(move |it| it.get(&file_id))
             .flatten();
         native_syntax.chain(native_semantic).chain(check)
     }
 
-    pub(crate) fn take_changes(&mut self) -> Option<IntSet<FileId>> {
+    pub(crate) fn take_changes(&mut self) -> Option<FxHashSet<FileId>> {
         if self.changes.is_empty() {
             return None;
         }
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs
index af1f6ce2b0b..6fc0ba9e66c 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs
@@ -12,7 +12,6 @@ use ide_db::base_db::{Crate, ProcMacroPaths, SourceDatabase};
 use itertools::Itertools;
 use load_cargo::SourceRootConfig;
 use lsp_types::{SemanticTokens, Url};
-use nohash_hasher::IntMap;
 use parking_lot::{
     MappedRwLockReadGuard, Mutex, RwLock, RwLockReadGuard, RwLockUpgradableReadGuard,
     RwLockWriteGuard,
@@ -117,7 +116,7 @@ pub(crate) struct GlobalState {
 
     // VFS
     pub(crate) loader: Handle<Box<dyn vfs::loader::Handle>, Receiver<vfs::loader::Message>>,
-    pub(crate) vfs: Arc<RwLock<(vfs::Vfs, IntMap<FileId, LineEndings>)>>,
+    pub(crate) vfs: Arc<RwLock<(vfs::Vfs, FxHashMap<FileId, LineEndings>)>>,
     pub(crate) vfs_config_version: u32,
     pub(crate) vfs_progress_config_version: u32,
     pub(crate) vfs_done: bool,
@@ -181,7 +180,7 @@ pub(crate) struct GlobalStateSnapshot {
     pub(crate) check_fixes: CheckFixes,
     mem_docs: MemDocs,
     pub(crate) semantic_tokens_cache: Arc<Mutex<FxHashMap<Url, SemanticTokens>>>,
-    vfs: Arc<RwLock<(vfs::Vfs, IntMap<FileId, LineEndings>)>>,
+    vfs: Arc<RwLock<(vfs::Vfs, FxHashMap<FileId, LineEndings>)>>,
     pub(crate) workspaces: Arc<Vec<ProjectWorkspace>>,
     // used to signal semantic highlighting to fall back to syntax based highlighting until
     // proc-macros have been loaded
@@ -265,7 +264,7 @@ impl GlobalState {
             discover_sender,
             discover_receiver,
 
-            vfs: Arc::new(RwLock::new((vfs::Vfs::default(), IntMap::default()))),
+            vfs: Arc::new(RwLock::new((vfs::Vfs::default(), Default::default()))),
             vfs_config_version: 0,
             vfs_progress_config_version: 0,
             vfs_span: None,
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs
index ec8b324aac3..75fe99e95d9 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs
@@ -1465,7 +1465,7 @@ pub(crate) fn handle_code_action(
     // Fixes from `cargo check`.
     for fix in snap
         .check_fixes
-        .values()
+        .iter()
         .flat_map(|it| it.values())
         .filter_map(|it| it.get(&frange.file_id))
         .flatten()
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
index 9cc990eec06..47fcb5ac02b 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
@@ -8,7 +8,6 @@ use std::{
     time::{Duration, Instant},
 };
 
-use always_assert::always;
 use crossbeam_channel::{Receiver, select};
 use ide_db::base_db::{SourceDatabase, VfsPath, salsa::Database as _};
 use lsp_server::{Connection, Notification, Request};
@@ -845,7 +844,7 @@ impl GlobalState {
             }
             vfs::loader::Message::Progress { n_total, n_done, dir, config_version } => {
                 let _p = span!(Level::INFO, "GlobalState::handle_vfs_msg/progress").entered();
-                always!(config_version <= self.vfs_config_version);
+                stdx::always!(config_version <= self.vfs_config_version);
 
                 let (n_done, state) = match n_done {
                     LoadingProgress::Started => {
diff --git a/src/tools/rust-analyzer/crates/stdx/Cargo.toml b/src/tools/rust-analyzer/crates/stdx/Cargo.toml
index 3727d0c9562..f6a5dedfda2 100644
--- a/src/tools/rust-analyzer/crates/stdx/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/stdx/Cargo.toml
@@ -14,12 +14,14 @@ rust-version.workspace = true
 [dependencies]
 backtrace = { version = "0.3.67", optional = true }
 jod-thread = "0.1.2"
-libc.workspace = true
 crossbeam-channel.workspace = true
 itertools.workspace = true
 tracing.workspace = true
 # Think twice before adding anything here
 
+[target.'cfg(unix)'.dependencies]
+libc.workspace = true
+
 [target.'cfg(windows)'.dependencies]
 miow = "0.6.0"
 windows-sys = { version = "0.59", features = ["Win32_Foundation"] }
diff --git a/src/tools/rust-analyzer/crates/syntax-bridge/Cargo.toml b/src/tools/rust-analyzer/crates/syntax-bridge/Cargo.toml
index 3e663422a04..cccd41d5429 100644
--- a/src/tools/rust-analyzer/crates/syntax-bridge/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/syntax-bridge/Cargo.toml
@@ -13,7 +13,6 @@ rust-version.workspace = true
 
 [dependencies]
 rustc-hash.workspace = true
-tracing.workspace = true
 
 # local deps
 syntax.workspace = true
diff --git a/src/tools/rust-analyzer/crates/syntax/Cargo.toml b/src/tools/rust-analyzer/crates/syntax/Cargo.toml
index 3fe6e01dc3c..7db1a4e4ba1 100644
--- a/src/tools/rust-analyzer/crates/syntax/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/syntax/Cargo.toml
@@ -12,12 +12,10 @@ rust-version.workspace = true
 [lib]
 
 [dependencies]
-cov-mark = "2.0.0-pre.1"
 either.workspace = true
 itertools.workspace = true
 rowan = "=0.15.15"
 rustc-hash.workspace = true
-indexmap.workspace = true
 smol_str.workspace = true
 triomphe.workspace = true
 tracing.workspace = true
diff --git a/src/tools/rust-analyzer/crates/test-utils/Cargo.toml b/src/tools/rust-analyzer/crates/test-utils/Cargo.toml
index b99a2c4bd75..f25512b2b7e 100644
--- a/src/tools/rust-analyzer/crates/test-utils/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/test-utils/Cargo.toml
@@ -15,7 +15,6 @@ rust-version.workspace = true
 # Avoid adding deps here, this crate is widely used in tests it should compile fast!
 dissimilar = "1.0.7"
 text-size.workspace = true
-tracing.workspace = true
 rustc-hash.workspace = true
 
 paths.workspace = true