Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cjgillot opened this issue Jun 1, 2021 · 1 comment
Closed
Labels
A-HIR Area: The high-level intermediate representation (HIR) A-incr-comp Area: Incremental compilation

Comments

@cjgillot
Copy link
Contributor

cjgillot commented Jun 1, 2021

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?
@camelid camelid added A-HIR Area: The high-level intermediate representation (HIR) A-incr-comp Area: Incremental compilation labels Jul 22, 2021
@cjgillot
Copy link
Contributor Author

Those maps have been removed and integrated into the HIR queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-HIR Area: The high-level intermediate representation (HIR) A-incr-comp Area: Incremental compilation
Projects
None yet
Development

No branches or pull requests

2 participants