-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Description
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
HirIdshould completely replace theNodeIdin HIR nodes. [...] Ideally we convert more and more code fromNodeIdtoHirIdin the future so that there are no moreNodeIds 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.