diff --git a/src/SUMMARY.md b/src/SUMMARY.md index a2f40ed35..51500906d 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -21,3 +21,4 @@ - [MIR optimizations](./mir-optimizations.md) - [Generating LLVM IR](./trans.md) - [Glossary](./glossary.md) +- [Code Index](./code-index.md) diff --git a/src/code-index.md b/src/code-index.md new file mode 100644 index 000000000..5b452ef0f --- /dev/null +++ b/src/code-index.md @@ -0,0 +1,9 @@ +# 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 +----------------|----------|-----------------------------|--------------------|------------------- +`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](ty.html) | [src/librustc/ty/context.rs](https://github.com/rust-lang/rust/blob/master/src/librustc/ty/context.rs)