Skip to content

Commit 684a502

Browse files
committed
bootstrap: add more detail on change-id comments
Signed-off-by: onur-ozkan <[email protected]>
1 parent 598b4fe commit 684a502

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bootstrap/src/lib.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ const LLD_FILE_NAMES: &[&str] = &["ld.lld", "ld64.lld", "lld-link", "wasm-ld"];
7676
/// You can visit `https://github.com/rust-lang/rust/pull/{any-id-from-the-list}` to
7777
/// check for more details regarding each change.
7878
///
79-
/// If you make any major changes (such as adding new values or changing default values), please
80-
/// ensure that the associated PR ID is added to the end of this list.
79+
/// If you make any major changes (such as adding new values or changing default values),
80+
/// please ensure that the associated PR ID is added to the end of this list.
81+
/// This is necessary because the list must be sorted by the merge date.
8182
pub const CONFIG_CHANGE_HISTORY: &[usize] = &[115898, 116998];
8283

8384
/// Extra --check-cfg to add when building
@@ -1800,8 +1801,10 @@ fn envify(s: &str) -> String {
18001801

18011802
pub fn find_recent_config_change_ids(current_id: usize) -> Vec<usize> {
18021803
if !CONFIG_CHANGE_HISTORY.contains(&current_id) {
1803-
// If the current change-id is greater than the most recent one,
1804-
// return an empty list; otherwise, return the full list.
1804+
// If the current change-id is greater than the most recent one, return
1805+
// an empty list (it may be due to switching from a recent branch to an
1806+
// older one); otherwise, return the full list (assuming the user provided
1807+
// the incorrect change-id by accident).
18051808
if let Some(max_id) = CONFIG_CHANGE_HISTORY.iter().max() {
18061809
if &current_id > max_id {
18071810
return Vec::new();

0 commit comments

Comments
 (0)