Skip to content

Commit

Permalink
fix(toml): Warn on unused workspace.dependencies keys on virtual work…
Browse files Browse the repository at this point in the history
…spaces
  • Loading branch information
epage committed Mar 27, 2024
1 parent 5d2fa44 commit 573fe52
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,16 @@ fn to_virtual_manifest(
let workspace_config = match original_toml.workspace {
Some(ref toml_config) => {
verify_lints(toml_config.lints.as_ref(), gctx, &mut warnings)?;
if let Some(ws_deps) = &toml_config.dependencies {
for (name, dep) in ws_deps {
unused_dep_keys(
name,
"workspace.dependencies",
dep.unused_keys(),
&mut warnings,
);
}
}
let ws_root_config = to_workspace_config(toml_config, root);
gctx.ws_roots
.borrow_mut()
Expand Down

0 comments on commit 573fe52

Please sign in to comment.