Closed
Description
Given this pretty common pattern
enum Foo { Bar(Bar) }
struct Bar { ... }
rustc
generates two DW_TAG_structure_type
entries in the same namespace both called Bar
, one for the Rust struct, the other for the Foo::Bar
variant. This is a problem for tools that want to refer to DWARF structure types by name (e.g. when trying to guess type identities across compilation unit boundaries). It would also be a problem if a user tries to refer to the type Bar
in the user interface of a debugger (without additional hacks like ignoring types containing RUST$ENUM$DISR
).