pub struct LocalInfo {
pub debug_name: Option<String>,
pub kind: LocalKind,
pub repr: MirLocalRepr,
pub heap_ownership: MirHeapOwnership,
pub ty: Ty,
}Expand description
Metadata tracked for each MIR local.
Fields§
§debug_name: Option<String>Optional debug-facing name for the local.
kind: LocalKindProvenance category of the local.
repr: MirLocalReprRuntime/storage representation of the local.
heap_ownership: MirHeapOwnershipHeap ownership policy used for retain/release and validation.
ty: TySemantic type assigned to the local.
Implementations§
Source§impl LocalInfo
impl LocalInfo
Sourcepub fn is_mutable_place(&self) -> bool
pub fn is_mutable_place(&self) -> bool
Return whether this local stores a mutable place/reference.
Sourcepub fn place_item_ty(&self) -> Option<&Ty>
pub fn place_item_ty(&self) -> Option<&Ty>
Return the semantic item type behind a place local, when applicable.
Sourcepub fn uses_heap_ops(&self) -> bool
pub fn uses_heap_ops(&self) -> bool
Return whether this local needs runtime heap retain/release operations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalInfo
impl RefUnwindSafe for LocalInfo
impl Send for LocalInfo
impl Sync for LocalInfo
impl Unpin for LocalInfo
impl UnwindSafe for LocalInfo
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