Debuginfo type names: Correctly handle generic arguments in paths #86289
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Currently paths in stringified type names emitted to debuginfo are generated by simply concatenating the components of corresponding DefPaths. If the type also includes generic arguments these will then just be appended at the end. This works OK as long as all arguments actually belong to the item in question but in cases where some of the arguments actually belong to enclosing items (i.e. further up the path) then this leads undesirable outcomes.
E.g. if we have the following impl
then we want a concrete instance with
T=u32
andU=bool
of the closure type to be printed asbut instead we get something like
Concretely we want generic parameters in paths to be
<Foo<_>>::foo::<_>::SOME_STATIC
).The text was updated successfully, but these errors were encountered: