From 38ff5a7a5e45457d99f0dde0ffeeecfcdf703f1e Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 25 Dec 2025 10:38:05 +0100 Subject: [PATCH] Introduce cargo-machete ci step --- src/tools/rust-analyzer/.github/workflows/ci.yaml | 6 ++++++ src/tools/rust-analyzer/Cargo.lock | 4 ---- src/tools/rust-analyzer/crates/hir-def/Cargo.toml | 1 - src/tools/rust-analyzer/crates/intern/Cargo.toml | 1 - .../rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml | 1 - src/tools/rust-analyzer/crates/syntax/fuzz/Cargo.toml | 1 - src/tools/rust-analyzer/crates/test-fixture/Cargo.toml | 1 - 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml index 5975272d871a..1a0deee564ae 100644 --- a/src/tools/rust-analyzer/.github/workflows/ci.yaml +++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml @@ -122,6 +122,12 @@ jobs: - name: Run tests run: cargo nextest run --no-fail-fast --hide-progress-bar --status-level fail + - name: Install cargo-machete + uses: taiki-e/install-action@cargo-machete + + - name: Run cargo-machete + run: cargo machete + - name: Run Clippy if: matrix.os == 'macos-latest' run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock index 1e924d92f424..a2eb8b1397b8 100644 --- a/src/tools/rust-analyzer/Cargo.lock +++ b/src/tools/rust-analyzer/Cargo.lock @@ -821,7 +821,6 @@ dependencies = [ "intern", "itertools 0.14.0", "la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mbe", "query-group-macro", "ra-ap-rustc_abi", "ra-ap-rustc_parse_format", @@ -1219,7 +1218,6 @@ dependencies = [ "hashbrown 0.14.5", "rayon", "rustc-hash 2.1.1", - "smallvec", "triomphe", ] @@ -1882,7 +1880,6 @@ dependencies = [ "postcard", "proc-macro-api", "proc-macro-srv", - "tt", ] [[package]] @@ -2782,7 +2779,6 @@ dependencies = [ "hir-expand", "intern", "paths", - "rustc-hash 2.1.1", "span", "stdx", "test-utils", diff --git a/src/tools/rust-analyzer/crates/hir-def/Cargo.toml b/src/tools/rust-analyzer/crates/hir-def/Cargo.toml index a9b51e347d60..46acf3de6264 100644 --- a/src/tools/rust-analyzer/crates/hir-def/Cargo.toml +++ b/src/tools/rust-analyzer/crates/hir-def/Cargo.toml @@ -40,7 +40,6 @@ intern.workspace = true base-db.workspace = true syntax.workspace = true hir-expand.workspace = true -mbe.workspace = true cfg.workspace = true tt.workspace = true span.workspace = true diff --git a/src/tools/rust-analyzer/crates/intern/Cargo.toml b/src/tools/rust-analyzer/crates/intern/Cargo.toml index 6414f091783c..ad73c191c047 100644 --- a/src/tools/rust-analyzer/crates/intern/Cargo.toml +++ b/src/tools/rust-analyzer/crates/intern/Cargo.toml @@ -18,7 +18,6 @@ dashmap.workspace = true hashbrown.workspace = true rustc-hash.workspace = true triomphe.workspace = true -smallvec.workspace = true rayon.workspace = true [lints] diff --git a/src/tools/rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml b/src/tools/rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml index aa153897fa96..2c6e5a16ee06 100644 --- a/src/tools/rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml +++ b/src/tools/rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml @@ -13,7 +13,6 @@ publish = false [dependencies] proc-macro-srv.workspace = true proc-macro-api.workspace = true -tt.workspace = true postcard.workspace = true clap = {version = "4.5.42", default-features = false, features = ["std"]} diff --git a/src/tools/rust-analyzer/crates/syntax/fuzz/Cargo.toml b/src/tools/rust-analyzer/crates/syntax/fuzz/Cargo.toml index 8910911ff025..b2f238efc025 100644 --- a/src/tools/rust-analyzer/crates/syntax/fuzz/Cargo.toml +++ b/src/tools/rust-analyzer/crates/syntax/fuzz/Cargo.toml @@ -10,7 +10,6 @@ cargo-fuzz = true [dependencies] syntax = { path = "..", version = "0.0.0" } -text-edit = { path = "../../text-edit", version = "0.0.0" } libfuzzer-sys = "0.4.5" # Prevent this from interfering with workspaces diff --git a/src/tools/rust-analyzer/crates/test-fixture/Cargo.toml b/src/tools/rust-analyzer/crates/test-fixture/Cargo.toml index 7760ae7aa045..74a4f8363248 100644 --- a/src/tools/rust-analyzer/crates/test-fixture/Cargo.toml +++ b/src/tools/rust-analyzer/crates/test-fixture/Cargo.toml @@ -14,7 +14,6 @@ test-utils.workspace = true tt.workspace = true cfg.workspace = true base-db.workspace = true -rustc-hash.workspace = true span.workspace = true stdx.workspace = true intern.workspace = true