Skip to content

Avoid empty extra-arg suggestion spans in macro calls#152634

Open
TaKO8Ki wants to merge 2 commits intorust-lang:mainfrom
TaKO8Ki:issue-152414-empty-extra-arg-span
Open

Avoid empty extra-arg suggestion spans in macro calls#152634
TaKO8Ki wants to merge 2 commits intorust-lang:mainfrom
TaKO8Ki:issue-152414-empty-extra-arg-span

Conversation

@TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Feb 14, 2026

Fixes #152414
Fixes #131762

When building Error::Extra removal suggestions, we extended spans with to and until even when syntax contexts differed in labels_and_suggestion_text. In macro-expanded calls this could fall back to an empty span and triggering an ICE.

I fixed it to combine spans only when contexts match.

@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 Feb 14, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2026

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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 68 candidates
  • Random selection from 14 candidates

@TaKO8Ki TaKO8Ki changed the title avoid empty extra-arg suggestion spans in macro calls Avoid empty extra-arg suggestion spans in macro calls Feb 14, 2026
@BoxyUwU
Copy link
Member

BoxyUwU commented Feb 14, 2026

r? compiler

@rustbot rustbot assigned fmease and unassigned BoxyUwU Feb 14, 2026
@rust-log-analyzer

This comment has been minimized.

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. 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.

[ICE]: Span must not be empty and have no suggestion ICE: underline_start >= 0 && underline_end >= 0

5 participants