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

Add info about IDs in the compiler #748

Closed
mark-i-m opened this issue Jun 15, 2020 · 0 comments · Fixed by #872
Closed

Add info about IDs in the compiler #748

mark-i-m opened this issue Jun 15, 2020 · 0 comments · Fixed by #872
Assignees
Labels
E-easy Difficulty: might be a good place for a beginner E-help-wanted Call for participation: extra help is wanted E-needs-writeup Call for participation: discussion can be written up without much research required

Comments

@mark-i-m
Copy link
Member

We should add the following content about IDs:

ID memo:

  • LocalDefId - the best variant, if you can use it for something do it. Cannot address entities in other crates and fine-grained entities like individual expressions in the current crate. Can address any items.
  • DefId - the second choice. Can address entities in other crates, but cannot address fine-grained entities like individual expressions.
  • HirId - Can address fine-grained entities like individual expressions in the current crate. Fine-grained entities from other crates can never be addressed in rustc.
  • NodeId - The last choice. Can address fine-grained entities like individual expressions when HirIds are not yet created.

Originally posted by @petrochenkov in rust-lang/rust#73291 (comment)

@mark-i-m mark-i-m added E-easy Difficulty: might be a good place for a beginner E-help-wanted Call for participation: extra help is wanted E-needs-writeup Call for participation: discussion can be written up without much research required labels Jun 15, 2020
@LeSeulArtichaut LeSeulArtichaut self-assigned this Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Difficulty: might be a good place for a beginner E-help-wanted Call for participation: extra help is wanted E-needs-writeup Call for participation: discussion can be written up without much research required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants