1. Getting Started
  2. About this guide
  3. Building and debugging rustc
  4. How to build and run the compiler
    1. Quickstart
    2. Prerequisites
    3. Suggested workflows
    4. Distribution artifacts
    5. Building documentation
    6. Rustdoc overview
    7. Adding a new target
    8. Optimized build
  5. Testing the compiler
    1. Running tests
      1. Testing with Docker
      2. Testing with CI
    2. Adding new tests
    3. Best practices
    4. Compiletest
      1. UI tests
      2. Test directives
      3. Minicore
    5. Ecosystem testing
      1. Crater
      2. Fuchsia
      3. Rust for Linux
    6. Codegen backend testing
      1. Cranelift codegen backend
      2. GCC codegen backend
    7. Performance testing
    8. Suggest tests tool
    9. Misc info
  6. Debugging the compiler
    1. Using the tracing/logging instrumentation
  7. Profiling the compiler
    1. with the linux perf tool
    2. with Windows Performance Analyzer
    3. with the Rust benchmark suite
  8. crates.io dependencies
  9. Contributing to Rust
  10. Contribution procedures
  11. About the compiler team
  12. Using Git
  13. Mastering @rustbot
  14. Walkthrough: a typical contribution
  15. Implementing new language features
  16. Stability attributes
  17. Stabilizing Features
  18. Feature Gates
  19. Coding conventions
  20. Procedures for breaking changes
  21. Using external repositories
  22. Fuzzing
  23. Notification groups
    1. Apple
    2. ARM
    3. Cleanup Crew
    4. Emscripten
    5. Fuchsia
    6. LLVM
    7. RISC-V
    8. Rust for Linux
    9. WASI
    10. WebAssembly
    11. Windows
  24. Licenses
  25. Editions
  26. Bootstrapping
  27. Prologue
  28. What Bootstrapping does
  29. How Bootstrap does it
  30. Writing tools in Bootstrap
  31. Debugging bootstrap
  32. cfg(bootstrap) in dependencies
  33. High-level Compiler Architecture
  34. Prologue
  35. Overview of the compiler
  36. The compiler source code
  37. Queries: demand-driven compilation
    1. The Query Evaluation Model in detail
    2. Incremental compilation
    3. Incremental compilation in detail
    4. Debugging and testing
    5. Salsa
  38. Memory management in rustc
  39. Serialization in rustc
  40. Parallel compilation
  41. Rustdoc internals
    1. Search
    2. The rustdoc test suite
  42. Autodiff internals
    1. Installation
    2. How to debug
    3. Autodiff flags
    4. Current limitations
  43. Source Code Representation
  44. Prologue
  45. Syntax and the AST
    1. Lexing and parsing
    2. Macro expansion
    3. Name resolution
    4. Attributes
    5. #[test] implementation
    6. Panic implementation
    7. AST validation
    8. Feature gate checking
    9. Lang Items
  46. The HIR (High-level IR)
    1. Lowering AST to HIR
    2. Debugging
  47. The THIR (Typed High-level IR)
  48. The MIR (Mid-level IR)
    1. MIR construction
    2. MIR visitor and traversal
    3. MIR queries and passes: getting the MIR
  49. Inline assembly
  50. Supporting Infrastructure
  51. Command-line arguments
  52. rustc_driver and rustc_interface
    1. Example: Type checking
    2. Example: Getting diagnostics
    3. Remarks on perma-unstable features
  53. Errors and lints
    1. Diagnostic and subdiagnostic structs
    2. Translation
    3. LintStore
    4. Error codes
    5. Diagnostic items
    6. ErrorGuaranteed
  54. Analysis
  55. Prologue
  56. Generic parameter definitions
    1. EarlyBinder and instantiating parameters
  57. Binders and Higher ranked regions
    1. Instantiating binders
  58. Early vs Late bound parameters
  59. The ty module: representing types
    1. ADTs and Generic Arguments
    2. Parameter types/consts/regions
  60. TypeFolder and TypeFoldable
  61. Typing/Param Envs
  62. Type inference
  63. Trait solving
    1. Higher-ranked trait bounds
    2. Caching subtleties
    3. Implied bounds
    4. Specialization
    5. Chalk-based trait solving
      1. Lowering to logic
      2. Goals and clauses
      3. Canonical queries
      4. Canonicalization
    6. Next-gen trait solving
      1. Invariants of the type system
      2. The solver
      3. Canonicalization
      4. Coinduction
      5. Caching
      6. Proof trees
      7. Normalization
      8. Opaque types
      9. Significant changes and quirks
    7. Unsize and CoerceUnsized traits
  64. Type checking
    1. Method Lookup
    2. Variance
    3. Coherence checking
    4. Opaque types
      1. Inference details
      2. Return Position Impl Trait In Trait
      3. Region inference restrictions
  65. Const condition checking
  66. Pattern and Exhaustiveness Checking
  67. Unsafety checking
  68. MIR dataflow
  69. Drop elaboration
  70. The borrow checker
    1. Tracking moves and initialization
      1. Move paths
    2. MIR type checker
    3. Drop check
    4. Region inference
      1. Constraint propagation
      2. Lifetime parameters
      3. Member constraints
      4. Placeholders and universes
      5. Closure constraints
      6. Error reporting
    5. Two-phase-borrows
  71. Closure capture inference
  72. Async closures/"coroutine-closures"
  73. MIR to Binaries
  74. Prologue
  75. MIR optimizations
  76. Debugging MIR
  77. Constant evaluation
    1. Interpreter
  78. Monomorphization
  79. Lowering MIR
  80. Code Generation
    1. Updating LLVM
    2. Debugging LLVM
    3. Backend Agnostic Codegen
    4. Implicit Caller Location
  81. Libraries and Metadata
  82. Profile-guided Optimization
  83. LLVM Source-Based Code Coverage
  84. Sanitizers Support
  85. Debugging support in the Rust compiler
  86. Appendix A: Background topics
  87. Appendix B: Glossary
  88. Appendix C: Code Index
  89. Appendix D: Compiler Lecture Series
  90. Appendix E: Bibliography
  91. Appendix Z: HumorRust