Lines Matching defs:elems
598 // the result is `Ok(..)`, then a `&T` with `elems` trailing slice
600 let (elems, split_at) =
602 let elems = T::PointerMetadata::from_elem_count(elems);
604 // For a slice DST type, if `meta` is `Some(elems)`, then we
607 // types, `validate_cast_and_convert_metadata` returns `elems == 0`.
608 // Thus, in this case, we need to use the `elems` passed by the
612 // Lemma 1: A `&T` with `elems` trailing slice elements is no larger
614 // - If `meta` is `None`, then `elems` satisfies this condition by
621 // Lemma 2: A `&T` with `elems` trailing slice elements is no larger
623 // `elems` is not larger in size than `bytes_len.get()`. By
628 // `elems` has size not larger than `isize::MAX`.
629 let elems = meta.unwrap_or(elems);
632 let elems = unsafe { MetadataOf::new_unchecked(elems) };
634 // SAFETY: Let `size` be the size of a `&T` with metadata `elems`.
639 // `split_at` elems has size not larger than `isize::MAX`.
647 Ok((elems, split_at))