Enum miri::CtfeValidationMode
source · pub enum CtfeValidationMode {
Static {
mutbl: Mutability,
},
Const {
allow_immutable_unsafe_cell: bool,
allow_static_ptrs: bool,
},
}
Expand description
Extra things to check for during validation of CTFE results.
Variants§
Static
Fields
§
mutbl: Mutability
Validation of a static
Const
Validation of a const
(including promoteds).
allow_immutable_unsafe_cell
says whether we allow UnsafeCell
in immutable memory (which is the
case for the top-level allocation of a const
, where this is fine because the allocation will be
copied at each use site).
allow_static_ptrs
says if pointers to statics are permitted (which is the case for promoteds in statics).
Auto Trait Implementations§
impl RefUnwindSafe for CtfeValidationMode
impl Send for CtfeValidationMode
impl Sync for CtfeValidationMode
impl Unpin for CtfeValidationMode
impl UnwindSafe for CtfeValidationMode
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
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: 2 bytes
Size for each variant:
Static
: 1 byteConst
: 2 bytes