Fix for pattern types causing ICE in debuginfo generation by notJoon · Pull Request #145716 · rust-lang/rust (original) (raw)
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.