mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00

`cargo add` - fix for adding features from repository with multiple packages. Fixes #13121 As discussed in the issue, when using `cargo add` to add a package with features from a git repository from one of it's members, the command might fail due to improper target for querying for said features. This PR adds a test for this edge-case where we expect it to fail with current code. It also adds a fix for this, and updates the test to expect success. While populating available features, the current code does a `Fuzzy` search which might lead to searching for features in a wrong member package. If we change it to an `Exact` query, we get back the proper member to search within.