Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 1.3 KB

code-index.md

File metadata and controls

12 lines (10 loc) · 1.3 KB

Code Index

rustc has a lot of important data structures. This is an attempt to give some guidance on where to learn more about some of the key data structures of the compiler.

Item Kind Short description Chapter Declaration
CodeMap struct The CodeMap maps the AST nodes to their source code The parser src/libsyntax/codemap.rs
ParseSess struct This struct contains information about a parsing session The parser src/libsyntax/parse/mod.rs
TraitDef struct This struct contains a trait's definition with type information The ty modules src/librustc/ty/trait_def.rs
TyCtxt<'cx, 'tcx, 'tcx> type The "typing context". This is the central data structure in the compiler. It is the context that you use to perform all manner of queries. The ty modules src/librustc/ty/context.rs