Skip to content

LocalDefId <-> HirId conversion functions may not be incremental safe #85914

Closed
@cjgillot

Description

@cjgillot

The conversion between LocalDefId and HirId relies on mappings that are built during AST->HIR lowering. Those mappings are not tracked anywhere. As a consequence, a node could see its HirId change without notice: for instance a closure above which an extra statement is inserted.

The consequences of this untracked data access are not clear at the moment:

  • are there queries whose result store an HirId?
  • do HirId really change without notice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-HIRArea: The high-level intermediate representation (HIR)A-incr-compArea: Incremental compilation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions