pub enum CtfeValidationMode {
    Regular,
    Const {
        inner: bool,
        allow_static_ptrs: bool,
    },
}
Expand description

Extra things to check for during validation of CTFE results.

Variants

Regular

Regular validation, nothing special happening.

Const

Fields

inner: bool
allow_static_ptrs: bool

Validation of a const. inner says if this is an inner, indirect allocation (as opposed to the top-level const allocation). Being an inner allocation makes a difference because the top-level allocation of a const is copied for each use, but the inner allocations are implicitly shared. allow_static_ptrs says if pointers to statics are permitted (which is the case for promoteds in statics).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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:

  • Regular: 0 bytes
  • Const: 2 bytes