mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
fix(toml): Warn on unused workspace.dependencies keys on virtual workspaces
This commit is contained in:
parent
5d2fa4497f
commit
573fe524cf
@ -1298,6 +1298,16 @@ fn to_virtual_manifest(
|
|||||||
let workspace_config = match original_toml.workspace {
|
let workspace_config = match original_toml.workspace {
|
||||||
Some(ref toml_config) => {
|
Some(ref toml_config) => {
|
||||||
verify_lints(toml_config.lints.as_ref(), gctx, &mut warnings)?;
|
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);
|
let ws_root_config = to_workspace_config(toml_config, root);
|
||||||
gctx.ws_roots
|
gctx.ws_roots
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user