Skip to content

Commit 573fe52

Browse files
committed
fix(toml): Warn on unused workspace.dependencies keys on virtual workspaces
1 parent 5d2fa44 commit 573fe52

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,16 @@ fn to_virtual_manifest(
12981298
let workspace_config = match original_toml.workspace {
12991299
Some(ref toml_config) => {
13001300
verify_lints(toml_config.lints.as_ref(), gctx, &mut warnings)?;
1301+
if let Some(ws_deps) = &toml_config.dependencies {
1302+
for (name, dep) in ws_deps {
1303+
unused_dep_keys(
1304+
name,
1305+
"workspace.dependencies",
1306+
dep.unused_keys(),
1307+
&mut warnings,
1308+
);
1309+
}
1310+
}
13011311
let ws_root_config = to_workspace_config(toml_config, root);
13021312
gctx.ws_roots
13031313
.borrow_mut()

0 commit comments

Comments
 (0)