Skip to content

document where various bits of rust are desugared #94

Open
@nikomatsakis

Description

@nikomatsakis

It's been mentioned to me that it would be useful to have a list of all the "desugarings" that occur during the compilation process. In particular, which bits of Rust disappear during e.g. HIR conversion, HAIR conversion, MIR conversion. Here are some notes, I'd love to see someone turn some of this into a more detailed writeup! If you're interested, ping me here or (better) on gitter/IRC.

Desugaring that occur during HIR lowering

While constructing the HIR, we perform the following desugarings. It seems worth documenting these at a high-level (e.g, showing the equivalent Rust code), as well as covering some of the mechanisms we use to do it (e.g., the special spans we construct).

Desugaring that occur during MIR lowering

While lowering to MIR, we perform the following desugarings:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-HIRArea: high-level intermediate representation (HIR)A-MIRArea: mid-level intermediate representation (MIR)A-THIRArea: typed high-level intermediate representation (THIR)A-desugaringArea: how constructs are desugared over various IR loweringsC-enhancementCategory: enhancementE-hardDifficulty: might require advanced knowledgeT-compilerRelevant to compiler team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions