pub enum PanicState {
EndsWithPanic(Vec<PanicLocation>),
Otherwise,
}
Expand description
A state saved for each position in the back analysis. Used to determine if a Panic object is guaranteed to exist or be created, an where.
Variants§
EndsWithPanic(Vec<PanicLocation>)
The flow will end with a panic. The locations are all the possible places a Panic object can be created from this flow. The flow is guaranteed to end up in one of these places.
Otherwise
Trait Implementations§
source§impl AuxCombine for PanicState
impl AuxCombine for PanicState
How to combine two panic states in a flow divergence.
source§impl Clone for PanicState
impl Clone for PanicState
source§fn clone(&self) -> PanicState
fn clone(&self) -> PanicState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for PanicState
impl Default for PanicState
source§fn default() -> PanicState
fn default() -> PanicState
Returns the “default value” for a type. Read more
source§impl DemandReporter<Id<Variable>, PanicState> for DestructAdder<'_>
impl DemandReporter<Id<Variable>, PanicState> for DestructAdder<'_>
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 Freeze for PanicState
impl RefUnwindSafe for PanicState
impl Send for PanicState
impl Sync for PanicState
impl Unpin for PanicState
impl UnwindSafe for PanicState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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