Struct rustc_mir::const_eval::MemoryExtra [−][src]
pub struct MemoryExtra {
pub(super) can_access_statics: bool,
}Fields
can_access_statics: boolWe need to make sure consts never point to anything mutable, even recursively. That is relied on for pattern matching on consts with references. To achieve this, two pieces have to work together:
- Interning makes everything outside of statics immutable.
- Pointers to allocations inside of statics can never leak outside, to a non-static global. This boolean here controls the second part.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MemoryExtraimpl Send for MemoryExtraimpl Sync for MemoryExtraimpl Unpin for MemoryExtraimpl UnwindSafe for MemoryExtraBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte