mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 14:07:04 +00:00
Add new change-id option in bootstrap.example.toml and update the change-id description references
This commit is contained in:
parent
02444322c0
commit
b24083bccc
@ -28,8 +28,9 @@
|
||||
# - A new option
|
||||
# - A change in the default values
|
||||
#
|
||||
# If `change-id` does not match the version that is currently running,
|
||||
# `x.py` will inform you about the changes made on bootstrap.
|
||||
# If the change-id does not match the version currently in use, x.py will
|
||||
# display the changes made to the bootstrap.
|
||||
# To suppress these warnings, you can set change-id = "ignore".
|
||||
#change-id = <latest change id in src/bootstrap/src/utils/change_tracker.rs>
|
||||
|
||||
# =============================================================================
|
||||
|
@ -163,7 +163,7 @@ fn check_version(config: &Config) -> Option<String> {
|
||||
msg.push_str("WARNING: The `change-id` is missing in the `bootstrap.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n");
|
||||
msg.push_str("NOTE: to silence this warning, ");
|
||||
msg.push_str(&format!(
|
||||
"add `change-id = {latest_change_id}` at the top of `bootstrap.toml`"
|
||||
"add `change-id = {latest_change_id}` or change-id = \"ignore\" at the top of `bootstrap.toml`"
|
||||
));
|
||||
return Some(msg);
|
||||
}
|
||||
@ -195,7 +195,7 @@ fn check_version(config: &Config) -> Option<String> {
|
||||
|
||||
msg.push_str("NOTE: to silence this warning, ");
|
||||
msg.push_str(&format!(
|
||||
"update `bootstrap.toml` to use `change-id = {latest_change_id}` instead"
|
||||
"update `bootstrap.toml` to use `change-id = {latest_change_id}` or change-id = \"ignore\" instead"
|
||||
));
|
||||
|
||||
if io::stdout().is_terminal() {
|
||||
|
@ -724,7 +724,11 @@ fn deserialize_change_id<'de, D: Deserializer<'de>>(
|
||||
Ok(match value {
|
||||
toml::Value::String(s) if s == "ignore" => Some(ChangeId::Ignore),
|
||||
toml::Value::Integer(i) => Some(ChangeId::Id(i as usize)),
|
||||
_ => return Err(serde::de::Error::custom("expected \"ignore\" or an integer")),
|
||||
_ => {
|
||||
return Err(serde::de::Error::custom(
|
||||
"expected \"ignore\" or an integer for change-id",
|
||||
));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -393,6 +393,6 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
|
||||
ChangeInfo {
|
||||
change_id: 138986,
|
||||
severity: ChangeSeverity::Info,
|
||||
summary: "You can now use `change_id = \"ignore\"` to suppress `change_id` warnings in the console.",
|
||||
summary: "You can now use `change-id = \"ignore\"` to suppress `change-id ` warnings in the console.",
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user