pub struct InstructionMetadata {
pub loop_depth: u16,
/* private fields */
}Expand description
Extra information attached to a MIR instruction by lowering or analysis passes.
Fields§
§loop_depth: u16Loop nesting depth attached by loop-aware analyses.
Implementations§
Source§impl InstructionMetadata
impl InstructionMetadata
Sourcepub fn storage_alias(&self) -> Option<StorageAlias>
pub fn storage_alias(&self) -> Option<StorageAlias>
Returns the proven storage alias key.
Sourcepub fn set_storage_alias(&mut self, alias: Option<StorageAlias>)
pub fn set_storage_alias(&mut self, alias: Option<StorageAlias>)
Sets the proven storage alias key.
Sourcepub fn hir_expr(&self) -> Option<ExprId>
pub fn hir_expr(&self) -> Option<ExprId>
Returns the HIR expression that produced this instruction.
Sourcepub fn set_hir_expr(&mut self, expr: Option<ExprId>)
pub fn set_hir_expr(&mut self, expr: Option<ExprId>)
Sets the HIR expression that produced this instruction.
Sourcepub fn source_span(&self) -> Option<Span>
pub fn source_span(&self) -> Option<Span>
Returns the source span that produced this instruction.
Sourcepub fn set_source_span(&mut self, span: Option<Span>)
pub fn set_source_span(&mut self, span: Option<Span>)
Sets the source span that produced this instruction.
Sourcepub fn memory_region(&self) -> Option<MemoryRegion>
pub fn memory_region(&self) -> Option<MemoryRegion>
Returns the proven memory region.
Sourcepub fn set_memory_region(&mut self, region: Option<MemoryRegion>)
pub fn set_memory_region(&mut self, region: Option<MemoryRegion>)
Sets the proven memory region.
Sourcepub fn unchecked(&self) -> bool
pub fn unchecked(&self) -> bool
Returns whether this instruction was lowered from an unchecked arithmetic context.
Sourcepub fn set_unchecked(&mut self, unchecked: bool)
pub fn set_unchecked(&mut self, unchecked: bool)
Sets whether this instruction was lowered from an unchecked arithmetic context.
Sourcepub fn effect(&self) -> Option<EffectKind>
pub fn effect(&self) -> Option<EffectKind>
Returns the conservative effect classification attached by lowering or analysis.
Sourcepub fn set_effect(&mut self, effect: Option<EffectKind>)
pub fn set_effect(&mut self, effect: Option<EffectKind>)
Sets the conservative effect classification attached by lowering or analysis.
Trait Implementations§
Source§impl Clone for InstructionMetadata
impl Clone for InstructionMetadata
Source§fn clone(&self) -> InstructionMetadata
fn clone(&self) -> InstructionMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstructionMetadata
impl Debug for InstructionMetadata
Source§impl Default for InstructionMetadata
impl Default for InstructionMetadata
Source§fn default() -> InstructionMetadata
fn default() -> InstructionMetadata
impl Eq for InstructionMetadata
Source§impl PartialEq for InstructionMetadata
impl PartialEq for InstructionMetadata
Source§fn eq(&self, other: &InstructionMetadata) -> bool
fn eq(&self, other: &InstructionMetadata) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InstructionMetadata
Auto Trait Implementations§
impl Freeze for InstructionMetadata
impl RefUnwindSafe for InstructionMetadata
impl Send for InstructionMetadata
impl Sync for InstructionMetadata
impl Unpin for InstructionMetadata
impl UnsafeUnpin for InstructionMetadata
impl UnwindSafe for InstructionMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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