Skip to main content

from_raw_parts_elem_size

Function from_raw_parts_elem_size 

Source
pub(crate) fn from_raw_parts_elem_size<'tcx>(
    tcx: TyCtxt<'tcx>,
    caller: DefId,
    dest: Option<Local>,
) -> u64
Expand description

Element size of a from_raw_parts result. Covers &[T]/*[T] (borrowed slice) and Vec<T> (owned); String and unknown layouts fall back to 1 (String’s element is u8, so 1 is correct).