From 684a5020cf77217b45e852d6fa80a3926dc1ebcf Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Tue, 7 Nov 2023 09:29:19 +0300 Subject: [PATCH] bootstrap: add more detail on change-id comments Signed-off-by: onur-ozkan --- src/bootstrap/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 1a3078892202..69a3add4b5ec 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -76,8 +76,9 @@ const LLD_FILE_NAMES: &[&str] = &["ld.lld", "ld64.lld", "lld-link", "wasm-ld"]; /// You can visit `https://github.com/rust-lang/rust/pull/{any-id-from-the-list}` to /// check for more details regarding each change. /// -/// If you make any major changes (such as adding new values or changing default values), please -/// ensure that the associated PR ID is added to the end of this list. +/// If you make any major changes (such as adding new values or changing default values), +/// please ensure that the associated PR ID is added to the end of this list. +/// This is necessary because the list must be sorted by the merge date. pub const CONFIG_CHANGE_HISTORY: &[usize] = &[115898, 116998]; /// Extra --check-cfg to add when building @@ -1800,8 +1801,10 @@ fn envify(s: &str) -> String { pub fn find_recent_config_change_ids(current_id: usize) -> Vec { if !CONFIG_CHANGE_HISTORY.contains(¤t_id) { - // If the current change-id is greater than the most recent one, - // return an empty list; otherwise, return the full list. + // If the current change-id is greater than the most recent one, return + // an empty list (it may be due to switching from a recent branch to an + // older one); otherwise, return the full list (assuming the user provided + // the incorrect change-id by accident). if let Some(max_id) = CONFIG_CHANGE_HISTORY.iter().max() { if ¤t_id > max_id { return Vec::new();