pub struct BorrowChecker<'a> { /* private fields */ }
Trait Implementations§
Source§impl Analyzer<'_> for BorrowChecker<'_>
impl Analyzer<'_> for BorrowChecker<'_>
type Info = Demand<Id<Variable>, LocationId, PanicState>
fn visit_stmt( &mut self, info: &mut Self::Info, (block_id, _): StatementLocation, stmt: &Statement, )
fn visit_goto( &mut self, info: &mut Self::Info, _statement_location: StatementLocation, _target_block_id: BlockId, remapping: &VarRemapping, )
fn merge_match( &mut self, (block_id, _): StatementLocation, match_info: &MatchInfo, infos: impl Iterator<Item = Self::Info>, ) -> Self::Info
fn info_from_return( &mut self, _statement_location: StatementLocation, vars: &[VarUsage], ) -> Self::Info
Source§fn info_from_panic(
&mut self,
_statement_location: StatementLocation,
data: &VarUsage,
) -> Self::Info
fn info_from_panic( &mut self, _statement_location: StatementLocation, data: &VarUsage, ) -> Self::Info
Default
info_from_panic
implementation for post ‘lower_panics’ phases.
Earlier phases need to override this implementation.fn visit_block_start( &mut self, info: &mut Self::Info, block_id: BlockId, block: &FlatBlock, )
Source§impl DemandReporter<Id<Variable>, PanicState> for BorrowChecker<'_>
impl DemandReporter<Id<Variable>, PanicState> for BorrowChecker<'_>
type IntroducePosition = (Option<DropPosition>, BlockId)
type UsePosition = LocationId
fn drop_aux( &mut self, (opt_drop_position, block_id): (Option<DropPosition>, BlockId), var_id: VariableId, panic_state: PanicState, )
fn dup( &mut self, position: LocationId, var_id: VariableId, next_usage_position: LocationId, )
fn drop(&mut self, _position: Self::IntroducePosition, _var: Var)
fn last_use(&mut self, _position: Self::UsePosition, _var: Var)
fn unused_mapped_var(&mut self, _var: Var)
Auto Trait Implementations§
impl<'a> Freeze for BorrowChecker<'a>
impl<'a> !RefUnwindSafe for BorrowChecker<'a>
impl<'a> !Send for BorrowChecker<'a>
impl<'a> !Sync for BorrowChecker<'a>
impl<'a> Unpin for BorrowChecker<'a>
impl<'a> !UnwindSafe for BorrowChecker<'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<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