Skip to content

Commit

Permalink
Fixup rebase artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Feb 4, 2025
1 parent c5444d0 commit 32ea0cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/cargo/core/resolver/dep_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,12 @@ impl RequirementError {
if deps.is_empty() {
return match parent {
None => {
let closest =
closest_msg(&feat.as_str(), summary.features().keys(), |key| &key);
let closest = closest_msg(
&feat.as_str(),
summary.features().keys(),
|key| &key,
"feature",
);
ActivateError::Fatal(anyhow::format_err!(
"Package `{}` does not have the feature `{}`{}",
summary.package_id(),
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/package_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ f3f4
.with_stderr_data(str![[r#"
[ERROR] Package `foo v0.1.0 ([ROOT]/foo)` does not have the feature `f2`
Did you mean `f1`?
[HELP] a feature with a similar name exists: `f1`
"#]])
.run();
Expand Down Expand Up @@ -408,7 +408,7 @@ fn feature_default_resolver() {
.with_stderr_data(str![[r#"
[ERROR] Package `a v0.1.0 ([ROOT]/foo)` does not have the feature `testt`
Did you mean `test`?
[HELP] a feature with a similar name exists: `test`
"#]])
.run();
Expand Down Expand Up @@ -822,7 +822,7 @@ m1-feature set
.with_stderr_data(str![[r#"
[ERROR] Package `member1 v0.1.0 ([ROOT]/foo/member1)` does not have the feature `m2-feature`
Did you mean `m1-feature`?
[HELP] a feature with a similar name exists: `m1-feature`
"#]])
.run();
Expand Down

0 comments on commit 32ea0cd

Please sign in to comment.