-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve two error messages #9472
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/cargo/util/toml/mod.rs
Outdated
@@ -395,7 +395,7 @@ impl<'de> de::Deserialize<'de> for TomlOptLevel { | |||
Ok(TomlOptLevel(value.to_string())) | |||
} else { | |||
Err(E::custom(format!( | |||
"must be an integer, `z`, or `s`, \ | |||
"must be `1`, `2`, `3`, `z`, or `s`, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 0 is accepted here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, absolutely! My bad.
@bors: r+ Thanks again! |
📌 Commit b381fdb has been approved by |
☀️ Test successful - checks-actions |
Update cargo 8 commits in e51522ab3db23b0d8f1de54eb1f0113924896331..070e459c2d8b79c5b2ac5218064e7603329c92ae 2021-05-07 21:29:52 +0000 to 2021-05-11 18:12:23 +0000 - Fix rustdoc warnings (rust-lang/cargo#9468) - Improve performance of git status check in `cargo package`. (rust-lang/cargo#9478) - Link to the new rustc tests chapter. (rust-lang/cargo#9477) - Bump index cache version to deal with semver metadata version mismatch. (rust-lang/cargo#9476) - Fix Url::into_string deprecation warning (rust-lang/cargo#9475) - Fix rust-lang/cargo#4482 and rust-lang/cargo#9449: set Fossil ignore and clean settings locally (rust-lang/cargo#9469) - Improve two error messages (rust-lang/cargo#9472) - Fix `cargo install` with a semver metadata version. (rust-lang/cargo#9467)
The first error message saying "an integer" is confusing because if you give it
4
it's an integer but it will still complain that it must be an integer. So it's more specific now and tells you that it actually needs to be1
,2
or3
.In the second error there was a space missing. It says
is not a valid setting,must be
.