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. 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 guarantees
  17. Stability attributes
  18. Stabilizing language features
    1. Stabilization report template
  19. Feature Gates
  20. Coding conventions
  21. Procedures for breaking changes
  22. Using external repositories
  23. Fuzzing
  24. Notification groups
    1. Apple
    2. ARM
    3. Emscripten
    4. Fuchsia
    5. RISC-V
    6. Rust for Linux
    7. WASI
    8. WebAssembly
    9. Windows
  25. Licenses
  26. Editions
  27. Bootstrapping
  28. Prologue
  29. What Bootstrapping does
  30. How Bootstrap does it
  31. Writing tools in Bootstrap
  32. Debugging bootstrap
  33. cfg(bootstrap) in dependencies
  34. High-level Compiler Architecture
  35. Prologue
  36. Overview of the compiler
  37. The compiler source code
  38. 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
  39. Memory management in rustc
  40. Serialization in rustc
  41. Parallel compilation
  42. Rustdoc internals
    1. Search
    2. The rustdoc test suite
    3. The rustdoc-gui test suite
    4. The rustdoc-json test suite
  43. GPU offload internals
    1. Installation
    2. Usage
  44. Autodiff internals
    1. Installation
    2. How to debug
    3. Autodiff flags
    4. Type Trees
  45. Source Code Representation
  46. Prologue
  47. 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
  48. The HIR (High-level IR)
    1. Lowering AST to HIR
    2. Ambig/Unambig Types and Consts
    3. Debugging
  49. The THIR (Typed High-level IR)
  50. The MIR (Mid-level IR)
    1. MIR construction
    2. MIR visitor and traversal
    3. MIR queries and passes: getting the MIR
  51. Inline assembly
  52. Supporting Infrastructure
  53. Command-line arguments
  54. rustc_driver and rustc_interface
    1. Remarks on perma-unstable features
    2. Example: Type checking
    3. Example: Getting diagnostics
  55. Errors and lints
    1. Diagnostic and subdiagnostic structs
    2. Translation
    3. LintStore
    4. Error codes
    5. Diagnostic items
    6. ErrorGuaranteed
  56. Analysis
  57. Prologue
  58. Generic parameter definitions
    1. EarlyBinder and instantiating parameters
  59. Binders and Higher ranked regions
    1. Instantiating binders
  60. Early vs Late bound parameters
  61. The ty module: representing types
    1. ADTs and Generic Arguments
    2. Parameter types/consts/regions
  62. TypeFolder and TypeFoldable
  63. Aliases and Normalization
  64. Typing/Param Envs
  65. Type inference
  66. 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. Candidate preference
      4. Canonicalization
      5. Coinduction
      6. Caching
      7. Proof trees
      8. Opaque types
      9. Significant changes and quirks
    7. Unsize and CoerceUnsized traits
  67. Variance
  68. Coherence checking
  69. HIR Type checking
    1. Coercions
    2. Method lookup
  70. Opaque types
    1. Inference details
    2. Return Position Impl Trait In Trait
    3. Region inference restrictions
  71. Const condition checking
  72. Pattern and exhaustiveness checking
  73. Unsafety checking
  74. MIR dataflow
  75. Drop elaboration
  76. 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
  77. Closure capture inference
  78. Async closures/"coroutine-closures"
  79. MIR to binaries
  80. Prologue
  81. MIR optimizations
  82. Debugging MIR
  83. Constant evaluation
    1. Interpreter
  84. Monomorphization
  85. Lowering MIR
  86. Code generation
    1. Updating LLVM
    2. Debugging LLVM
    3. Backend Agnostic Codegen
    4. Implicit caller location
  87. Libraries and metadata
  88. Profile-guided optimization
  89. LLVM source-based code coverage
  90. Sanitizers support
  91. Debugging support in the Rust compiler
  92. Appendix A: Background topics
  93. Appendix B: Glossary
  94. Appendix C: Code Index
  95. Appendix D: Compiler Lecture Series
  96. Appendix E: Bibliography
  97. Appendix Z: HumorRust