NodeState in rustc_data_structures::graph::scc - Rust (original) (raw)
enum NodeState<N, S, A: Annotation> {
NotVisited,
BeingVisited {
depth: usize,
annotation: A,
},
InCycle {
scc_index: S,
annotation: A,
},
InCycleWith {
parent: N,
},
}
This node has not yet been visited as part of the DFS.
After SCC construction is complete, this state ought to be impossible.
This node is currently being walked as part of our DFS. It is on the stack at the depth depth and its current annotation isannotation.
After SCC construction is complete, this state ought to be impossible.
Fields
Indicates that this node is a member of the given cycle where the merged annotation is annotation. Note that an SCC can have several cycles, so its final annotation is the merged value of all its member annotations.
Fields
Indicates that this node is a member of whatever cycleparent is a member of. This state is transient: whenever we see it, we try to overwrite it with the current state ofparent (this is the “path compression” step of a union-find algorithm).
Fields
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.