Add info about IDs in the compiler #748
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
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 whenHirId
s are not yet created.Originally posted by @petrochenkov in rust-lang/rust#73291 (comment)
The text was updated successfully, but these errors were encountered: