debuginfo: Variables in generic functions should have generic type. #8641
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
As per 3.3.7 Function Template Instantiations of the DWARF 4 specification, the template type parameter DIE (debug information entry) should be referenced where it has been used in the source code, as opposed to the DIE for the type that has been substituted for the parameter.
In the context of Rust this would mean that the variable
x
in the following function should be described as having typeT=int
instead of just typeint
:As of PR #8554 generic functions are supported but arguments, return value, locals, etc are described as having their type concrete type instead of "their generic type substituted by their concrete type". That means that debug info loses some information.
This should not pose a big problem to the regular debugging workflow---but I wanted to record somewhere that this issue exists.
The text was updated successfully, but these errors were encountered: