Module rustc_next_trait_solver::solve

source ·
Expand description

The next-generation trait solver, currently still WIP.

As a user of rust, you can use -Znext-solver to enable the new trait solver.

As a developer of rustc, you shouldn’t be using the new trait solver without asking the trait-system-refactor-initiative, but it can be enabled with InferCtxtBuilder::with_next_trait_solver. This will ensure that trait solving using that inference context will be routed to the new trait solver.

For a high-level overview of how this solver works, check out the relevant section of the rustc-dev-guide.

FIXME(@lcnr): Write that section. If you read this before then ask me about it on zulip.

Modules§

  • Implements the AliasRelate goal, which is used when unifying aliases. Doing this via a separate goal is called “deferred alias relation” and part of our more general approach to “lazy normalization”.
  • assembly 🔒
    Code shared by trait and projection goals for candidate assembly.
  • eval_ctxt 🔒
  • Dealing with trait goals, i.e. T: Trait<'a, U>.

Structs§

Enums§

Constants§

  • How many fixpoint iterations we should attempt inside of the solver before bailing with overflow.

Traits§

Functions§

Type Aliases§