Struct rustc_type_ir::search_graph::StackEntry
source · struct StackEntry<X: Cx> {
input: X::Input,
available_depth: AvailableDepth,
reached_depth: StackDepth,
non_root_cycle_participant: Option<StackDepth>,
encountered_overflow: bool,
has_been_used: Option<UsageKind>,
nested_goals: HashSet<X::Input>,
provisional_result: Option<X::Result>,
}
Fields§
§input: X::Input
§available_depth: AvailableDepth
§reached_depth: StackDepth
The maximum depth reached by this stack entry, only up-to date for the top of the stack and lazily updated for the rest.
non_root_cycle_participant: Option<StackDepth>
Whether this entry is a non-root cycle participant.
We must not move the result of non-root cycle participants to the global cache. We store the highest stack depth of a head of a cycle this goal is involved in. This necessary to soundly cache its provisional result.
encountered_overflow: bool
§has_been_used: Option<UsageKind>
§nested_goals: HashSet<X::Input>
We put only the root goal of a coinductive cycle into the global cache.
If we were to use that result when later trying to prove another cycle participant, we can end up with unstable query results.
See tests/ui/next-solver/coinduction/incompleteness-unstable-result.rs for an example of where this is needed.
There can be multiple roots on the same stack, so we need to track cycle participants per root:
A :- B
B :- A, C
C :- D
D :- C
provisional_result: Option<X::Result>
Starts out as None
and gets set when rerunning this
goal in case we encounter a cycle.
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§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 moresource§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 moresource§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
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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.