pub(super) struct StackEntry<X: Cx> {
pub input: X::Input,
pub step_kind_from_parent: PathKind,
pub available_depth: AvailableDepth,
pub required_depth: usize,
pub provisional_result: Option<X::Result>,
pub heads: CycleHeads,
pub encountered_overflow: bool,
pub usages: Option<HeadUsages>,
pub candidate_usages: Option<CandidateHeadUsages>,
pub nested_goals: NestedGoals<X>,
}Expand description
Stack entries of the evaluation stack. Its fields tend to be lazily updated when popping a child goal or completely immutable.
Fields§
§input: X::Input§step_kind_from_parent: PathKindWhether proving this goal is a coinductive step.
This is used when encountering a trait solver cycle to decide whether the initial provisional result of the cycle.
available_depth: AvailableDepthThe available depth of a given goal, immutable.
required_depth: usizeThe maximum depth required while evaluating this goal.
provisional_result: Option<X::Result>Starts out as None and gets set when rerunning this
goal in case we encounter a cycle.
heads: CycleHeadsAll cycle heads this goal depends on. Lazily updated and only up-to date for the top of the stack.
encountered_overflow: boolWhether evaluating this goal encountered overflow. Lazily updated.
usages: Option<HeadUsages>Whether and how this goal has been used as a cycle head. Lazily updated.
candidate_usages: Option<CandidateHeadUsages>We want to be able to ignore head usages if they happen inside of candidates which don’t impact the result of a goal. This enables us to avoid rerunning goals and is also used when rebasing provisional cache entries.
To implement this, we track all usages while evaluating a candidate. If this candidate
then ends up ignored, we manually remove its usages from usages and heads.
nested_goals: NestedGoals<X>The nested goals of this goal, see the doc comment of the type.
Trait Implementations§
Auto Trait Implementations§
impl<X> DynSend for StackEntry<X>
impl<X> DynSync for StackEntry<X>
impl<X> Freeze for StackEntry<X>
impl<X> RefUnwindSafe for StackEntry<X>
impl<X> Send for StackEntry<X>
impl<X> Sync for StackEntry<X>
impl<X> Unpin for StackEntry<X>
impl<X> UnwindSafe for StackEntry<X>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoEither for T
impl<T> IntoEither for T
§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.