Skip to content

Fix for pattern types causing ICE in debuginfo generation #145716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

notJoon
Copy link
Contributor

@notJoon notJoon commented Aug 21, 2025

This PR fixes #145514 where pattern types would cause an ICE when generating debug info. The issue was that the compiler didn't know how to handle ty::Pat types in the debuginfo metadata generation.

The pattern types are refinement types that have the same runtim representation as their underlying type, so I just generate a typedef in the debuginfo that points to the inner type but uses the pattern type's name. It would give debuggers the right information.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 21, 2025
@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
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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: debuginfo: unexpected type in type_di_node(): pattern_type!(i8 is 1..=2)
3 participants