Skip to content

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

@jswrenn

Description

@jswrenn

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:

  • no fields: unit-like
  • fields are in the form __\d+: tuple-like
  • otherwise: struct-like

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions