Skip to content

round-trippability of HIR pretty printing #60663

Closed
@oli-obk

Description

@oli-obk

Should it be possible to feed the output of --unpretty=hir back to rustc without requiring the user to do any changes? Right now this is only possible for very trivial code, and even then requires adding some feature gates.

Any code with moderately complex expansions will require additional imports or touching the code. Some things I've noticed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-HIRArea: The high-level intermediate representation (HIR)A-prettyArea: Pretty printing (including `-Z unpretty`)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions