Stream: t-compiler/help

Topic: IDs everywhere


Keith Yeung (Oct 02 2019 at 18:23, on Zulip):

what do the various IDs of the compiler represent, and how are they related?

Keith Yeung (Oct 02 2019 at 18:24, on Zulip):

there is NodeId, DefId, LocalItemId, and many more...

Keith Yeung (Oct 02 2019 at 18:24, on Zulip):

but by far the most prevalent type of ID is DefId

Tshepang Lekhonkhobe (Oct 02 2019 at 19:18, on Zulip):

some of that is explained https://rust-lang.github.io/rustc-guide/hir.html#identifiers-in-the-hir

Tshepang Lekhonkhobe (Oct 02 2019 at 19:20, on Zulip):

only one note explained is LocalitemId... where did you see it?

Keith Yeung (Oct 02 2019 at 20:03, on Zulip):

so i misremembered, it's called ItemLocalId

Keith Yeung (Oct 02 2019 at 20:08, on Zulip):

so the other question i have is, how are they generated?

Keith Yeung (Oct 02 2019 at 20:08, on Zulip):

i know how NodeIds are generated -- they're done by the Resolver after macro expansion

Keith Yeung (Oct 02 2019 at 20:09, on Zulip):

the DefId sounds like a very key component that i have to know

Last update: Nov 11 2019 at 23:05UTC