Function core::intrinsics::read_via_copy
const: unstable · source · pub unsafe extern "rust-intrinsic" fn read_via_copy<T>(
p: *const T
) -> T
🔬This is a nightly-only experimental API. (
core_intrinsics
)Expand description
This is an implementation detail of crate::ptr::read
and should
not be used anywhere else. See its comments for why this exists.
This intrinsic can only be called where the argument is a local without
projections (read_via_copy(p)
, not read_via_copy(*p)
) so that it
trivially obeys runtime-MIR rules about derefs in operands.