Struct miri::borrow_tracker::tree_borrows::tree::TreeVisitorStack
source · struct TreeVisitorStack<NodeApp, ErrHandler> {
initial: UniIndex,
f_propagate: NodeApp,
err_builder: ErrHandler,
stack: Vec<(UniIndex, AccessRelatedness)>,
}
Expand description
Stack of nodes left to explore in a tree traversal.
Fields§
§initial: UniIndex
Identifier of the original access.
f_propagate: NodeApp
Function to apply to each tag.
err_builder: ErrHandler
Handler to add the required context to diagnostics.
stack: Vec<(UniIndex, AccessRelatedness)>
Mutable state of the visit: the tags left to handle. Every tag pushed should eventually be handled, and the precise order is relevant for diagnostics.
Implementations§
source§impl<NodeApp, InnErr, OutErr, ErrHandler> TreeVisitorStack<NodeApp, ErrHandler>where
NodeApp: Fn(NodeAppArgs<'_>) -> Result<ContinueTraversal, InnErr>,
ErrHandler: Fn(ErrHandlerArgs<'_, InnErr>) -> OutErr,
impl<NodeApp, InnErr, OutErr, ErrHandler> TreeVisitorStack<NodeApp, ErrHandler>where
NodeApp: Fn(NodeAppArgs<'_>) -> Result<ContinueTraversal, InnErr>,
ErrHandler: Fn(ErrHandlerArgs<'_, InnErr>) -> OutErr,
sourcefn exec_and_visit(
&mut self,
this: &mut TreeVisitor<'_>,
idx: UniIndex,
exclude: Option<UniIndex>,
rel_pos: AccessRelatedness
) -> Result<(), OutErr>
fn exec_and_visit( &mut self, this: &mut TreeVisitor<'_>, idx: UniIndex, exclude: Option<UniIndex>, rel_pos: AccessRelatedness ) -> Result<(), OutErr>
Apply the function to the current tag
, and push its children
to the stack of future tags to visit.
fn new(initial: UniIndex, f_propagate: NodeApp, err_builder: ErrHandler) -> Self
sourcefn finish(&mut self, visitor: &mut TreeVisitor<'_>) -> Result<(), OutErr>
fn finish(&mut self, visitor: &mut TreeVisitor<'_>) -> Result<(), OutErr>
Finish the exploration by applying exec_and_visit
until
the stack is empty.
sourcefn push_and_visit_strict_ancestors(
&mut self,
visitor: &mut TreeVisitor<'_>
) -> Result<(), OutErr>
fn push_and_visit_strict_ancestors( &mut self, visitor: &mut TreeVisitor<'_> ) -> Result<(), OutErr>
Push all ancestors to the exploration stack in order of nearest ancestor towards the top.
Auto Trait Implementations§
impl<NodeApp, ErrHandler> DynSend for TreeVisitorStack<NodeApp, ErrHandler>
impl<NodeApp, ErrHandler> DynSync for TreeVisitorStack<NodeApp, ErrHandler>
impl<NodeApp, ErrHandler> Freeze for TreeVisitorStack<NodeApp, ErrHandler>
impl<NodeApp, ErrHandler> RefUnwindSafe for TreeVisitorStack<NodeApp, ErrHandler>where
NodeApp: RefUnwindSafe,
ErrHandler: RefUnwindSafe,
impl<NodeApp, ErrHandler> Send for TreeVisitorStack<NodeApp, ErrHandler>
impl<NodeApp, ErrHandler> Sync for TreeVisitorStack<NodeApp, ErrHandler>
impl<NodeApp, ErrHandler> Unpin for TreeVisitorStack<NodeApp, ErrHandler>
impl<NodeApp, ErrHandler> UnwindSafe for TreeVisitorStack<NodeApp, ErrHandler>where
NodeApp: UnwindSafe,
ErrHandler: UnwindSafe,
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
Mutably borrows from an owned value. Read more
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Filterable for T
impl<T> Filterable 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<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<'tcx, T> ToPredicate<'tcx, T> for T
impl<'tcx, T> ToPredicate<'tcx, T> for T
fn to_predicate(self, _tcx: TyCtxt<'tcx>) -> T
source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed ) -> 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,
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
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.