Skip to content

avoid overlapping const suggestions - #161411

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
im-lunex:fix_#161213
Aug 25, 2026
Merged

avoid overlapping const suggestions#161411
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
im-lunex:fix_#161213

Conversation

@im-lunex

@im-lunex im-lunex commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Avoid emitting the optional const-extraction suggestion when its component spans overlap, this avoids the compiler panic while still emitting the normal error and keeping the suggestion for cases where it can be
generated correctly

Fixes #161213

@rustbot

rustbot commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 20, 2026
@rustbot

rustbot commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 17 candidates

@nnethercote

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 08ec41e has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
avoid overlapping const suggestions

Avoid emitting the optional `const-extraction` suggestion when its **component spans** overlap, this avoids the compiler panic while still emitting the normal error and keeping the suggestion for cases where it can be
generated correctly

Fixes rust-lang#161213
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup of 5 pull requests

Successful merges:

 - #156749 (remove `box_patterns`)
 - #161411 (avoid overlapping const suggestions)
 - #161484 (Discard `.pdr` in the PSP linker script)
 - #161663 (Reduce dependency on implicit paths in bootstrap)
 - #161720 (rename rust_target_features query to make it clear that these are *all* target features)
@rust-bors
rust-bors Bot merged commit 9f6bef7 into rust-lang:main Aug 25, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup merge of #161411 - im-lunex:fix_#161213, r=nnethercote

avoid overlapping const suggestions

Avoid emitting the optional `const-extraction` suggestion when its **component spans** overlap, this avoids the compiler panic while still emitting the normal error and keeping the suggestion for cases where it can be
generated correctly

Fixes #161213
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 26, 2026
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#156749 (remove `box_patterns`)
 - rust-lang/rust#161411 (avoid overlapping const suggestions)
 - rust-lang/rust#161484 (Discard `.pdr` in the PSP linker script)
 - rust-lang/rust#161663 (Reduce dependency on implicit paths in bootstrap)
 - rust-lang/rust#161720 (rename rust_target_features query to make it clear that these are *all* target features)
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 28, 2026
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#156749 (remove `box_patterns`)
 - rust-lang/rust#161411 (avoid overlapping const suggestions)
 - rust-lang/rust#161484 (Discard `.pdr` in the PSP linker script)
 - rust-lang/rust#161663 (Reduce dependency on implicit paths in bootstrap)
 - rust-lang/rust#161720 (rename rust_target_features query to make it clear that these are *all* target features)
vetleras pushed a commit to vetleras/rustfmt that referenced this pull request Aug 28, 2026
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#156749 (remove `box_patterns`)
 - rust-lang/rust#161411 (avoid overlapping const suggestions)
 - rust-lang/rust#161484 (Discard `.pdr` in the PSP linker script)
 - rust-lang/rust#161663 (Reduce dependency on implicit paths in bootstrap)
 - rust-lang/rust#161720 (rename rust_target_features query to make it clear that these are *all* target features)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

invalid range in macro triggers compiler panic at assertion left == right failed: suggestion must not have overlapping parts

3 participants