From 5f6984a222e21e97976bdcb773dd3fe008b9fc26 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 21:22:09 -0800 Subject: [PATCH] workspace: allow unused_workspace_dependencies in the Cargo lint table unused_workspace_dependencies is a Cargo lint, so its level belongs in [workspace.lints.cargo]. Under [workspace.lints.rust] and [workspace.lints.clippy], Cargo passed it to rustc and Clippy as -A unused_workspace_dependencies and -A clippy::unused_workspace_dependencies, which each crate reported as E0602 (unknown lint). The [lints] entry in .cargo/config.toml did not set the level either, so Cargo 1.100 still printed 73 "unused workspace dependency" warnings for the workspace. The allow now sits in [workspace.lints.cargo], which every member inherits through [lints] workspace = true, and .cargo/config.toml is removed. On Cargo 1.100, cargo check --workspace --tests prints no E0602 and no unused workspace dependency warnings. Cargo 1.95 accepts the table but reports lints.cargo as an unused manifest key. https://doc.rust-lang.org/cargo/reference/lints.html#unused_workspace_dependencies https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table --- .cargo/config.toml | 2 -- Cargo.toml | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 873f4f7aac..0000000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[lints] -cargo.unused_workspace_dependencies = "allow" diff --git a/Cargo.toml b/Cargo.toml index 57b7d3ef7c..07bd9c4937 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -174,13 +174,14 @@ chrono = { version = "0.4.45", default-features = false, features = ["std"] } [workspace.lints.rust] unsafe_code = "forbid" -unused_workspace_dependencies = "allow" unexpected_cfgs = { level = "warn", check-cfg = ["cfg(craft_pdf_unicode_fixtures)"] } +[workspace.lints.cargo] +unused_workspace_dependencies = "allow" + [workspace.lints.clippy] cognitive_complexity = "deny" too_many_arguments = "deny" -unused_workspace_dependencies = "allow" wildcard_imports = "deny" dbg_macro = "warn" todo = "warn"