Skip to content

fix(cfg): correct separator index in CfgDiff disable loop#22426

Open
shulaoda wants to merge 1 commit into
rust-lang:masterfrom
shulaoda:05-23-fix_cfg_correct_separator_index_in_cfgdiff_disable_loop
Open

fix(cfg): correct separator index in CfgDiff disable loop#22426
shulaoda wants to merge 1 commit into
rust-lang:masterfrom
shulaoda:05-23-fix_cfg_correct_separator_index_in_cfgdiff_disable_loop

Conversation

@shulaoda
Copy link
Copy Markdown
Contributor

@shulaoda shulaoda commented May 23, 2026

The disable loop reused self.enable.len() - 1 when detecting the last atom, causing wrong "and" placement (and a debug-mode panic when enable was empty). Add a regression test for disable a and b.

🤖 Spotted via AI-assisted code review.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants