Skip to content

Conversation

Kivooeo
Copy link
Member

@Kivooeo Kivooeo commented Oct 6, 2025

Fixes #147255

The problem original was from that stmt.span was from expansion and it span was bigger than right part which is block.span, so it causes empty span and panic later on, I decided to add checks for both of them to be on the safe side

r? @fmease (you were in discussion on this issue so I decided to assign you, feel free to reroll)

@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 Oct 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

fmease is not on the review rotation at the moment.
They may take a while to respond.

@chenyukang
Copy link
Member

these errors are recurring, how can we implement a long-term fix.
i remember we had a try, but it was blocked by performance regression.

@Kivooeo
Copy link
Member Author

Kivooeo commented Oct 7, 2025

This should not affect performance. As for a long-term fix, I’m not sure we can implement one, since it may occur in unexpected places. We can probably fix issues like this only gradually over time

@Kivooeo
Copy link
Member Author

Kivooeo commented Oct 7, 2025

For example this ICE was since 1.86, which is pretty old, but I have no idea what has changed after 1.85 that could break this

@chenyukang
Copy link
Member

This should not affect performance. As for a long-term fix, I’m not sure we can implement one, since it may occur in unexpected places. We can probably fix issues like this only gradually over time

i'm referring this one which have perf regression: #109082

i have a revisit on that PR, seems it was fixing a different issue (but general in similar kind).

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] thread 'rustc' panicked at compiler/rustc_errors/src/diagnostic.rs:1025:9
4 participants