Struct tracing_core::stdlib::mem::Assume
source · pub struct Assume {
pub alignment: bool,
pub lifetimes: bool,
pub safety: bool,
pub validity: bool,
}
transmutability
#99571)Expand description
What transmutation safety conditions shall the compiler assume that you are checking?
Fields§
§alignment: bool
transmutability
#99571)When true
, the compiler assumes that you are ensuring (either dynamically or statically) that
destination referents do not have stricter alignment requirements than source referents.
lifetimes: bool
transmutability
#99571)When true
, the compiler assume that you are ensuring that lifetimes are not extended in a manner
that violates Rust’s memory model.
safety: bool
transmutability
#99571)When true
, the compiler assumes that you have ensured that no
unsoundness will arise from violating the safety invariants of the
destination type (and sometimes of the source type, too).
validity: bool
transmutability
#99571)When true
, the compiler assumes that you are ensuring that the source type is actually a valid
instance of the destination type.
Implementations§
source§impl Assume
impl Assume
sourcepub const NOTHING: Assume = _
🔬This is a nightly-only experimental API. (transmutability
#99571)
pub const NOTHING: Assume = _
transmutability
#99571)Do not assume that you have ensured any safety properties are met.
sourcepub const ALIGNMENT: Assume = _
🔬This is a nightly-only experimental API. (transmutability
#99571)
pub const ALIGNMENT: Assume = _
transmutability
#99571)Assume only that alignment conditions are met.
sourcepub const LIFETIMES: Assume = _
🔬This is a nightly-only experimental API. (transmutability
#99571)
pub const LIFETIMES: Assume = _
transmutability
#99571)Assume only that lifetime conditions are met.
sourcepub const SAFETY: Assume = _
🔬This is a nightly-only experimental API. (transmutability
#99571)
pub const SAFETY: Assume = _
transmutability
#99571)Assume only that safety conditions are met.
sourcepub const VALIDITY: Assume = _
🔬This is a nightly-only experimental API. (transmutability
#99571)
pub const VALIDITY: Assume = _
transmutability
#99571)Assume only that dynamically-satisfiable validity conditions are met.