Struct rustc_const_eval::const_eval::MemoryExtra [−][src]
pub struct MemoryExtra {
pub(super) can_access_statics: bool,
}
Fields
can_access_statics: bool
We 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 MemoryExtra
impl Send for MemoryExtra
impl Sync for MemoryExtra
impl Unpin for MemoryExtra
impl UnwindSafe for MemoryExtra
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. 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