Skip to content

Commit e0cb1cc

Browse files
committed
bootstrap: add more detail on change-id comments
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent e878100 commit e0cb1cc

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

8283
/// Extra --check-cfg to add when building
@@ -1850,8 +1851,10 @@ fn envify(s: &str) -> String {
18501851

18511852
pub fn find_recent_config_change_ids(current_id: usize) -> Vec<usize> {
18521853
if !CONFIG_CHANGE_HISTORY.contains(&current_id) {
1853-
// If the current change-id is greater than the most recent one,
1854-
// return an empty list; otherwise, return the full list.
1854+
// If the current change-id is greater than the most recent one, return
1855+
// an empty list (it may be due to switching from a recent branch to an
1856+
// older one); otherwise, return the full list (assuming the user provided
1857+
// the incorrect change-id by accident).
18551858
if let Some(max_id) = CONFIG_CHANGE_HISTORY.iter().max() {
18561859
if &current_id > max_id {
18571860
return Vec::new();

0 commit comments

Comments
 (0)