Skip to content

Commit

Permalink
Fixes #13121: Use Exact query during populating features. Update test
Browse files Browse the repository at this point in the history
 fix target output
  • Loading branch information
stupendoussuperpowers committed Dec 29, 2023
1 parent 61f6248 commit e46d80e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_add/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ fn populate_available_features(
}

let possibilities = loop {
match registry.query_vec(&query, QueryKind::Fuzzy) {
match registry.query_vec(&query, QueryKind::Exact) {
std::task::Poll::Ready(res) => {
break res?;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn case() {
])
.current_dir(cwd)
.assert()
.failure()
.success()
.stdout_matches_path(curr_dir!().join("stdout.log"))
.stderr_matches_path(curr_dir!().join("stderr.log"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
[package]
name = "cargo-list-test-fixture"
version = "0.0.0"

[dependencies]
package-with-feature = { git = "[ROOTURL]/git-package", version = "0.1.3", features = ["target_feature"] }
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Updating git repository `[ROOTURL]/git-package`
Adding package-with-feature (git) to dependencies.
error: unrecognized feature for crate package-with-feature: target_feature
no features available for crate package-with-feature
Features:
+ target_feature
Updating git repository `[ROOTURL]/git-package`

0 comments on commit e46d80e

Please sign in to comment.