You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Suggest similar looking feature names when feature is missing (#15454)
### What does this PR try to resolve?
I recently depended on a package with `preserve-order` rather than
`preserve_order` and the error message didn't help me with the problem
so I figure I'd fix that. I also found other improvements along the way
- Suggest an alternative feature when a feature includes a missing
feature
- Suggest an alternative feature when a dependency includes a missing
feature
- Lower case error messages
- Re-frame prescriptive information as help
- Change plural "features" error messages to singular "feature" as they
can only ever have one (knowing an the `MissingFeature` string only has
one feature in it was important for doing a `closest` match on the
feature).
### How should we test and review this PR?
### Additional information
Copy file name to clipboardExpand all lines: tests/testsuite/build_script.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1032,7 +1032,7 @@ fn links_duplicates() {
1032
1032
... required by package `foo v0.5.0 ([ROOT]/foo)`
1033
1033
versions that meet the requirements `*` are: 0.5.0
1034
1034
1035
-
the package `a-sys` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
1035
+
package `a-sys` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
1036
1036
package `foo v0.5.0 ([ROOT]/foo)`
1037
1037
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "a"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
... which satisfies path dependency `a` of package `foo v0.5.0 ([ROOT]/foo)`
1160
1160
versions that meet the requirements `*` are: 0.5.0
1161
1161
1162
-
the package `a-sys` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
1162
+
package `a-sys` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
1163
1163
package `foo v0.5.0 ([ROOT]/foo)`
1164
1164
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "a"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
versions that meet the requirements `*` are: 0.5.0
4769
4769
4770
-
the package `a` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
4770
+
package `a` links to the native library `a`, but it conflicts with a previous package which links to `a` as well:
4771
4771
package `foo v0.5.0 ([ROOT]/foo)`
4772
4772
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "a"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
0 commit comments