Home Explore Blog CI



rustc

4th chunk of `src/SUMMARY.md`
7ed3a8eaf41c9f59bbc8bee22d4214d2294c02782f68b7790000000100000e5c
        - [Goals and clauses](./traits/goals-and-clauses.md)
        - [Canonical queries](./traits/canonical-queries.md)
        - [Canonicalization](./traits/canonicalization.md)
    - [Next-gen trait solving](./solve/trait-solving.md)
        - [Invariants of the type system](./solve/invariants.md)
        - [The solver](./solve/the-solver.md)
        - [Canonicalization](./solve/canonicalization.md)
        - [Coinduction](./solve/coinduction.md)
        - [Caching](./solve/caching.md)
        - [Proof trees](./solve/proof-trees.md)
        - [Opaque types](./solve/opaque-types.md)
        - [Significant changes and quirks](./solve/significant-changes.md)
    - [`Unsize` and `CoerceUnsized` traits](./traits/unsize.md)
- [Type checking](./type-checking.md)
    - [Method Lookup](./method-lookup.md)
    - [Variance](./variance.md)
    - [Coherence checking](./coherence.md)
    - [Opaque types](./opaque-types-type-alias-impl-trait.md)
        - [Inference details](./opaque-types-impl-trait-inference.md)
        - [Return Position Impl Trait In Trait](./return-position-impl-trait-in-trait.md)
        - [Region inference restrictions][opaque-infer]
- [Const condition checking](./effects.md)
- [Pattern and Exhaustiveness Checking](./pat-exhaustive-checking.md)
- [Unsafety checking](./unsafety-checking.md)
- [MIR dataflow](./mir/dataflow.md)
- [Drop elaboration](./mir/drop-elaboration.md)
- [The borrow checker](./borrow_check.md)
    - [Tracking moves and initialization](./borrow_check/moves_and_initialization.md)
        - [Move paths](./borrow_check/moves_and_initialization/move_paths.md)
    - [MIR type checker](./borrow_check/type_check.md)
    - [Drop check](./borrow_check/drop_check.md)
    - [Region inference](./borrow_check/region_inference.md)
        - [Constraint propagation](./borrow_check/region_inference/constraint_propagation.md)
        - [Lifetime parameters](./borrow_check/region_inference/lifetime_parameters.md)
        - [Member constraints](./borrow_check/region_inference/member_constraints.md)
        - [Placeholders and universes][pau]
        - [Closure constraints](./borrow_check/region_inference/closure_constraints.md)
        - [Error reporting](./borrow_check/region_inference/error_reporting.md)
    - [Two-phase-borrows](./borrow_check/two_phase_borrows.md)
- [Closure capture inference](./closure.md)
- [Async closures/"coroutine-closures"](coroutine-closures.md)

# MIR to Binaries

- [Prologue](./part-5-intro.md)
- [MIR optimizations](./mir/optimizations.md)
- [Debugging MIR](./mir/debugging.md)
- [Constant evaluation](./const-eval.md)
    - [Interpreter](./const-eval/interpret.md)
- [Monomorphization](./backend/monomorph.md)
- [Lowering MIR](./backend/lowering-mir.md)
- [Code Generation](./backend/codegen.md)
    - [Updating LLVM](./backend/updating-llvm.md)
    - [Debugging LLVM](./backend/debugging.md)
    - [Backend Agnostic Codegen](./backend/backend-agnostic.md)
    - [Implicit Caller Location](./backend/implicit-caller-location.md)
- [Libraries and Metadata](./backend/libs-and-metadata.md)
- [Profile-guided Optimization](./profile-guided-optimization.md)
- [LLVM Source-Based Code Coverage](./llvm-coverage-instrumentation.md)
- [Sanitizers Support](./sanitizers.md)
- [Debugging support in the Rust compiler](./debugging-support-in-rustc.md)

---

[Appendix A: Background topics](./appendix/background.md)

[Appendix B: Glossary](./appendix/glossary.md)

[Appendix C: Code Index](./appendix/code-index.md)

[Appendix D: Compiler Lecture Series](./appendix/compiler-lecture.md)

[Appendix E: Bibliography](./appendix/bibliography.md)

[Appendix Z: HumorRust](./appendix/humorust.md)

---


Title: Compiler Analysis: Trait Solving, Type Checking, Borrow Checking, and MIR to Binaries
Summary
This section covers advanced aspects of Rust compiler analysis, starting with trait solving, including goals and clauses, canonical queries and canonicalization, next-gen trait solving covering invariants, the solver, canonicalization, coinduction, caching, proof trees, opaque types, and Unsize traits. It then discusses type checking, method lookup, variance, coherence checking, and opaque types. The borrow checker section includes tracking moves, MIR type checker, drop check, and region inference. Closure capture inference and async closures are also covered. The 'MIR to Binaries' section details MIR optimizations, debugging MIR, constant evaluation, monomorphization, lowering MIR, code generation (including debugging LLVM and backend-agnostic codegen), libraries and metadata, profile-guided optimization, LLVM source-based code coverage, sanitizer support, and debugging support. The document concludes with several appendices.