Implemention detail of generics

I just want to have a broad idea of how rust stores information about concrete types in the usage of identifiers which is used at the monomorphization phase. I understand that the type checking of generics can be done locally enough not requiring this kind of registry. But rust would need to have all concrete types tuples gathered from the code while using that identifier (with syntax ident::<>). I want to know very broadly the kind of data structure rust uses to store all concrete types for a identifier (and I suspect that this data structure is attached to the symbol table entry). My guesses can be completely wrong so correct me there also please.

You can check out the Rust Compiler book, in particular the section on monomorphization:

Thanks @hax10 for the reference. I will go through it once.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.