Skip to content

HirId-ification initiative #50928

Closed
Closed
@zackmdavis

Description

@zackmdavis

HirIds were introduced in bc259ee (March 2017) as a replacement for ast::NodeIds after HIR lowering; this is said to be good for incremental compilation. The commentary for pull request #43740 (August 2017) says:

In the future the HirId should completely replace the NodeId in HIR nodes. [...] Ideally we convert more and more code from NodeId to HirId in the future so that there are no more NodeIds after HIR lowering anywhere.

The HIR chapter of the rustc development guide similarly says "while [NodeIds] are still in common use, they are being slowly phased out" (emphasis in original).

However, a drawback of the "gradually migrate over to the new way of doing things in the course of addressing other issues" strategy is that it's all too easy for the codebase to remain in a transitional state indefinitely. Thus, perhaps we should have this dedicated issue to track progress towards not using NodeIds after HIR lowering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-HIRArea: The high-level intermediate representation (HIR)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.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