Skip to main content

aggregate_raw_ptr

Function aggregate_raw_ptr 

Source
pub const fn aggregate_raw_ptr<P: BuiltinDeref, D, M>(data: D, meta: M) -> P
where <P as BuiltinDeref>::Pointee: Pointee<Metadata = M>,
🔬This is a nightly-only experimental API. (core_intrinsics)
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Expand description

Lowers in MIR to Rvalue::Aggregate with AggregateKind::RawPtr.

This is used to implement functions like slice::from_raw_parts_mut and ptr::from_raw_parts in a way compatible with the compiler being able to change the possible layouts of pointers.