Skip to content

Conversation

@psg-19
Copy link
Contributor

@psg-19 psg-19 commented Feb 7, 2026

Fixes #3004

Summary :- the function check_implicit_features collect the paths of all cargo.toml files, which packages are in workspace and which dependencies are optional using cargo metadata. Then using the toml crate it parses the cargo.toml files and checks what features are explicitly defined by the developer and whether any feature references dep:<name> for each optional dep.
It detects implicit features when an optional dependency:

  • does not have a same name feature in [features]
  • and is not referenced via dep:<name> anywhere in [features]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guard against implicit features

1 participant