We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RawVec::into_box
1 parent cbbdca0 commit fed3d6eCopy full SHA for fed3d6e
src/liballoc/raw_vec.rs
@@ -574,7 +574,8 @@ impl<T> RawVec<T, Global> {
574
///
575
/// # Safety
576
577
- /// * `len` must be smaller than or equal to `self.capacity()`
+ /// `shrink_to_fit(len)` must be called immediately prior to calling this function. This
578
+ /// implies, that `len` must be smaller than or equal to `self.capacity()`.
579
pub unsafe fn into_box(self, len: usize) -> Box<[MaybeUninit<T>]> {
580
debug_assert!(
581
len <= self.capacity(),
0 commit comments