jswrenn / deflect

Reflection via DWARF.
Apache License 2.0
295 stars 5 forks source link

Distinguish between record structs, tuple structs, and unit structs. #3

Open jswrenn opened 1 year ago

jswrenn commented 1 year ago

Deflect's pretty printing does not distinguish between record structs/variants, tuple structs/variants and unit structs/variants. This leads to some exceptionally ugly rendering of Option, Result, etc. Can we do better?

There's nothing in the DWARF DIEs of these types that distinguishes them. This heuristic might be acceptable:

bjorn3 commented 1 year ago

I believe those heuristics is what GDB does.