Skip to content
Opensource internals
  • Posts

Trait solver

rustc's Trait Solver Doesn't Write Error Messages: It Writes Proof Trees

Oct 21, 2026 6 min read Jay Hubbert

rustc’s next-gen trait solver never constructs error messages while solving; it records a proof tree and replays it later, with caches bypassed, to find the real cause of a …

RustInternalsCompilerTrait solverDiagnosticsPerformance

Read more →

Divide by Four: How rustc's Trait Solver Makes Itself Stop

Oct 21, 2026 6 min read Jay Hubbert

rustc’s next-gen trait solver normally decrements its recursion budget by one, but after an overflow it divides the budget by four, so the solver terminates almost immediately …

RustInternalsCompilerTrait solverPerformance

Read more →

Coinduction for Free: The Three-Value Lattice That Makes rustc's Trait Solver Terminate

Oct 21, 2026 8 min read Jay Hubbert

The new trait solver’s PathKind lattice (Inductive < Unknown < Coinductive) is joined with a max-like operation, so a cycle’s kind is recomputed compositionally on every stack …

RustInternalsCompilerTrait solverAlgorithms

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·