struct EvalCtxt<'a, 'tcx> {
    infcx: &'a InferCtxt<'tcx>,
    var_values: CanonicalVarValues<'tcx>,
    search_graph: &'a mut SearchGraph<'tcx>,
}

Fields§

§infcx: &'a InferCtxt<'tcx>§var_values: CanonicalVarValues<'tcx>§search_graph: &'a mut SearchGraph<'tcx>

Implementations§

If the self type of a goal is a projection, computing the relevant candidates is difficult.

To deal with this, we first try to normalize the self type and add the candidates for the normalized self type to the list of candidates in case that succeeds. Note that we can’t just eagerly return in this case as projections as self types add `

Is the projection predicate is of the form exists<T> <Ty as Trait>::Assoc = T.

This is the case if the term is an inference variable in the innermost universe and does not occur in any other part of the predicate.

A while-loop which tracks overflow.

Convenience function for traits that are structural, i.e. that only have nested subgoals that only change the self type. Unlike other evaluate-like helpers, this does a probe, so it doesn’t need to be wrapped in one.

Creates a new evaluation context outside of the trait solver.

With this solver making a canonical response doesn’t make much sense. The search_graph for this solver has to be completely empty.

Recursively evaluates goal, returning whether any inference vars have been constrained and the certainty of the result.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 40 bytes