pub struct DestructAdder<'db, 'a> { /* private fields */ }Expand description
Context for the destructor call addition phase,
Trait Implementations§
Source§impl<'db> Analyzer<'db, '_> for DestructAdder<'db, '_>
impl<'db> Analyzer<'db, '_> for DestructAdder<'db, '_>
type Info = Demand<Id<VariableMarker>, (), PanicState>
fn visit_stmt( &mut self, info: &mut Self::Info, (block_id, statement_index): StatementLocation, stmt: &Statement<'db>, )
fn visit_goto( &mut self, info: &mut Self::Info, _statement_location: StatementLocation, _target_block_id: BlockId, remapping: &VarRemapping<'db>, )
fn merge_match( &mut self, (block_id, _statement_index): StatementLocation, match_info: &MatchInfo<'db>, infos: impl Iterator<Item = Self::Info>, ) -> Self::Info
fn info_from_return( &mut self, statement_location: StatementLocation, vars: &[VarUsage<'db>], ) -> Self::Info
fn visit_block_start( &mut self, info: &mut Self::Info, block_id: BlockId, block: &Block<'db>, )
Source§fn info_from_panic(
&mut self,
statement_location: StatementLocation,
var: &VarUsage<'db>,
) -> Self::Info
fn info_from_panic( &mut self, statement_location: StatementLocation, var: &VarUsage<'db>, ) -> Self::Info
Default
info_from_panic implementation for post ‘lower_panics’ phases.
Earlier phases need to override this implementation.Source§impl<'db> DemandReporter<Id<VariableMarker>, PanicState> for DestructAdder<'db, '_>
impl<'db> DemandReporter<Id<VariableMarker>, PanicState> for DestructAdder<'db, '_>
type IntroducePosition = (BlockId, usize)
type UsePosition = ()
fn drop_aux( &mut self, position: StatementLocation, var_id: VariableId, panic_state: PanicState, )
fn drop(&mut self, _position: Self::IntroducePosition, _var: Var)
fn dup( &mut self, _position: Self::UsePosition, _var: Var, _next_usage_position: Self::UsePosition, )
fn last_use(&mut self, _position: Self::UsePosition, _var: Var)
fn unused_mapped_var(&mut self, _var: Var)
Auto Trait Implementations§
impl<'db, 'a> Freeze for DestructAdder<'db, 'a>
impl<'db, 'a> !RefUnwindSafe for DestructAdder<'db, 'a>
impl<'db, 'a> !Send for DestructAdder<'db, 'a>
impl<'db, 'a> !Sync for DestructAdder<'db, 'a>
impl<'db, 'a> Unpin for DestructAdder<'db, 'a>
impl<'db, 'a> !UnwindSafe for DestructAdder<'db, 'a>
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<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
fn debug_db_upcast(&'db self) -> &'db 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>
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 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>
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