mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Improve two error messages
This commit is contained in:
parent
e51522ab3d
commit
b381fdb71e
@ -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 `0`, `1`, `2`, `3`, `s` or `z`, \
|
||||
but found the string: \"{}\"",
|
||||
value
|
||||
)))
|
||||
@ -553,7 +553,7 @@ impl TomlProfile {
|
||||
if let Some(panic) = &self.panic {
|
||||
if panic != "unwind" && panic != "abort" {
|
||||
bail!(
|
||||
"`panic` setting of `{}` is not a valid setting,\
|
||||
"`panic` setting of `{}` is not a valid setting, \
|
||||
must be `unwind` or `abort`",
|
||||
panic
|
||||
);
|
||||
|
@ -583,7 +583,7 @@ opt-level = 'foo'
|
||||
error in [..]/.cargo/config: could not load config key `profile.dev.opt-level`
|
||||
|
||||
Caused by:
|
||||
must be an integer, `z`, or `s`, but found the string: \"foo\"",
|
||||
must be `0`, `1`, `2`, `3`, `s` or `z`, but found the string: \"foo\"",
|
||||
);
|
||||
|
||||
let config = ConfigBuilder::new()
|
||||
@ -596,7 +596,7 @@ Caused by:
|
||||
error in environment variable `CARGO_PROFILE_DEV_OPT_LEVEL`: could not load config key `profile.dev.opt-level`
|
||||
|
||||
Caused by:
|
||||
must be an integer, `z`, or `s`, but found the string: \"asdf\"",
|
||||
must be `0`, `1`, `2`, `3`, `s` or `z`, but found the string: \"asdf\"",
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user