Skip to content

Commit abcd66e

Browse files
authored
fix: mention "3" as a valid value for "resolver" field in error message (#15215)
<!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. ### What does this PR try to resolve? Explain the motivation behind this change. A clear overview along with an in-depth explanation are helpful. You can use `Fixes #<issue number>` to associate this PR to an existing issue. ### How should we test and review this PR? Demonstrate how you test this change and guide reviewers through your PR. With a smooth review process, a pull request usually gets reviewed quicker. If you don't know how to write and run your tests, please read the guide: https://doc.crates.io/contrib/tests ### Additional information Other information you want to mention in this PR, such as prior arts, future extensions, an unresolved problem, or a TODO list. --> ### What does this PR try to resolve? Just a small update to the error message for the resolver field, which now accepts "3" as a valid value. ### How should we test and review this PR? ### Additional information
2 parents 1566e4c + dbd64ec commit abcd66e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cargo/core/resolver/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl ResolveBehavior {
122122
"2" => Ok(ResolveBehavior::V2),
123123
"3" => Ok(ResolveBehavior::V3),
124124
s => anyhow::bail!(
125-
"`resolver` setting `{}` is not valid, valid options are \"1\" or \"2\"",
125+
"`resolver` setting `{}` is not valid, valid options are \"1\", \"2\" or \"3\"",
126126
s
127127
),
128128
}

tests/testsuite/features2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ fn resolver_bad_setting() {
13911391
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
13921392
13931393
Caused by:
1394-
`resolver` setting `foo` is not valid, valid options are "1" or "2"
1394+
`resolver` setting `foo` is not valid, valid options are "1", "2" or "3"
13951395
13961396
"#]])
13971397
.run();

0 commit comments

Comments
 (0)