Skip to main content

GatherCandidates

Struct GatherCandidates 

Source
struct GatherCandidates<'a> {
    body: &'a ExprBody,
    flag_statuses: IndexVec<LocalId, FlagStatus>,
}

Fields§

§body: &'a ExprBody§flag_statuses: IndexVec<LocalId, FlagStatus>

Implementations§

Source§

impl GatherCandidates<'_>

Source

fn dropped_places_in_true_branch( &self, true_target: BlockId, false_target: BlockId, ) -> Vec<Place>

Follow the true branch until it reaches the false target, and accumulate any place that gets unconditionally dropped along the way. We ignore unwind paths and other switches.

Trait Implementations§

Source§

impl VisitBody for GatherCandidates<'_>

Source§

fn enter_local_id(&mut self, local: &LocalId)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn visit_ullbc_statement( &mut self, statement: &Statement, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit_ullbc_terminator( &mut self, terminator: &Terminator, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn visit<'a, T: BodyVisitable>(&'a mut self, x: &T) -> ControlFlow<Self::Break>

Visit a visitable type. This calls the appropriate method of this trait on x (visit_$ty if it exists, visit_inner if not).
Source§

fn visit_by_val<T: BodyVisitable>(self, x: &T) -> ControlFlow<Self::Break, Self>

Convenience alias for method chaining.
Source§

fn visit_by_val_infallible<T: BodyVisitable>(self, x: &T) -> Self
where Self: Visitor<Break = Infallible> + Sized,

Convenience when the visitor does not return early.
Source§

fn visit_inner<T>(&mut self, x: &T) -> ControlFlow<Self::Break>
where T: BodyVisitable + for<'s> Drive<'s, BodyVisitableWrapper<Self>>,

Visit the contents of x. This calls self.visit() on each field of T. This is available for any type whose contents are all #trait_name.
Source§

fn visit_body(&mut self, x: &Body) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_body(&mut self, x: &Body)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_body(&mut self, x: &Body)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_locals(&mut self, x: &Locals) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_locals(&mut self, x: &Locals)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_locals(&mut self, x: &Locals)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_local(&mut self, x: &Local) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_local(&mut self, x: &Local)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_local(&mut self, x: &Local)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_local_id(&mut self, x: &LocalId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn exit_local_id(&mut self, x: &LocalId)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_aggregate_kind( &mut self, x: &AggregateKind, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_aggregate_kind(&mut self, x: &AggregateKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_aggregate_kind(&mut self, x: &AggregateKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_asm_operand(&mut self, x: &AsmOperand) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_asm_operand(&mut self, x: &AsmOperand)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_asm_operand(&mut self, x: &AsmOperand)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_call(&mut self, x: &Call) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_call(&mut self, x: &Call)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_call(&mut self, x: &Call)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_fn_operand(&mut self, x: &FnOperand) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_fn_operand(&mut self, x: &FnOperand)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_fn_operand(&mut self, x: &FnOperand)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_fn_ptr(&mut self, x: &FnPtr) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_fn_ptr(&mut self, x: &FnPtr)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_fn_ptr(&mut self, x: &FnPtr)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_operand(&mut self, x: &Operand) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_operand(&mut self, x: &Operand)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_operand(&mut self, x: &Operand)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_place(&mut self, x: &Place) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_place(&mut self, x: &Place)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_place(&mut self, x: &Place)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_projection_elem( &mut self, x: &ProjectionElem, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_projection_elem(&mut self, x: &ProjectionElem)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_projection_elem(&mut self, x: &ProjectionElem)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_rvalue(&mut self, x: &Rvalue) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_rvalue(&mut self, x: &Rvalue)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_rvalue(&mut self, x: &Rvalue)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_llbc_block(&mut self, x: &Block) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_llbc_block(&mut self, x: &Block)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_llbc_block(&mut self, x: &Block)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_llbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_llbc_statement(&mut self, x: &Statement)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_llbc_statement(&mut self, x: &Statement)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_ullbc_block(&mut self, x: &BlockData) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_ullbc_block(&mut self, x: &BlockData)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_ullbc_block(&mut self, x: &BlockData)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn enter_ullbc_statement(&mut self, x: &Statement)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_ullbc_statement(&mut self, x: &Statement)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn enter_ullbc_terminator(&mut self, x: &Terminator)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_ullbc_terminator(&mut self, x: &Terminator)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

fn visit_ullbc_block_id(&mut self, x: &BlockId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited. Read more
Source§

fn enter_ullbc_block_id(&mut self, x: &BlockId)

Called when starting to visit a $ty (unless visit_$ty is overriden).
Source§

fn exit_ullbc_block_id(&mut self, x: &BlockId)

Called when finished visiting a $ty (unless visit_$ty is overriden).
Source§

impl<'a> Visitor for GatherCandidates<'a>

Source§

type Break = !

The type used for early-return, if the visitor supports it. Use an empty type like std::convert::Infallible if the visitor does not short-circuit.

Auto Trait Implementations§

§

impl<'a> Freeze for GatherCandidates<'a>

§

impl<'a> RefUnwindSafe for GatherCandidates<'a>

§

impl<'a> Send for GatherCandidates<'a>

§

impl<'a> Sync for GatherCandidates<'a>

§

impl<'a> Unpin for GatherCandidates<'a>

§

impl<'a> UnsafeUnpin for GatherCandidates<'a>

§

impl<'a> UnwindSafe for GatherCandidates<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Mappable for T
where T: Any + Send + Sync,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more