Module solve

Module 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.

Modules§

inspect

Structs§

EvalCtxt
ExternalConstraintsData
Additional constraints returned on success.
Goal
A goal is a statement, i.e. predicate, we want to prove given some assumptions, i.e. param_env.
GoalEvaluation
The result of evaluating a goal.
GoalStalledOn
The conditions that must change for a goal to warrant
NestedNormalizationGoals
NoSolution
QueryInput
Response

Enums§

AdtDestructorKind
Indicates that a impl Drop for Adt is const or not.
BuiltinImplSource
CandidateSource
Possible ways the given goal can be proven.
Certainty
GenerateProofTree
GoalSource
Why a specific goal has to be proven.
HasChanged
Whether evaluating this goal ended up changing the inference state.
MaybeCause
Why we failed to evaluate a goal.
OpaqueTypesJank
Supporting not-yet-defined opaque types in HIR typeck is somewhat challenging. Ideally we’d normalize them to a new inference variable and just defer type inference which relies on the opaque until we’ve constrained the hidden type.
ParamEnvSource
SizedTraitKind
Which sizedness trait - Sized, MetaSized? PointeeSized is omitted as it is removed during lowering.

Traits§

SolverDelegateEvalExt

Functions§

evaluate_root_goal_for_proof_tree_raw_provider
Do not call this directly, use the tcx query instead.

Type Aliases§

CanonicalInput
CanonicalResponse
QueryResult
The result of evaluating a canonical query.