77 SizedProps ,
88 USIZE_MAX_NO_HIGH_BIT ,
99 varsized_nonnull_from_parts,
10- varsized_pointer_from_raw_parts
10+ varsized_pointer_from_parts
1111 } ,
1212 error:: { AlignErr , AllocError , ArithErr , ArithOp , Cause , InvLayout , LayoutErr }
1313 } ,
@@ -206,7 +206,7 @@ const_if! {
206206 "Creates a `NonNull<[T]>` from a pointer and a length.\n \n This is a helper used in place of
207207 [`NonNull::slice_from_raw_parts`], which was stabilized after this crate's MSRV." ,
208208 #[ must_use]
209- pub const fn nonnull_slice_from_raw_parts <T >( p: NonNull <T >, len: usize ) -> NonNull <[ T ] > {
209+ pub const fn nonnull_slice_from_parts <T >( p: NonNull <T >, len: usize ) -> NonNull <[ T ] > {
210210 varsized_nonnull_from_parts( p. cast( ) , len)
211211 }
212212}
@@ -216,8 +216,8 @@ const_if! {
216216 "Creates a `*mut [T]` from a pointer and a length.\n \n This is a helper used in place of \
217217 [`ptr::slice_from_raw_parts_mut`], which was const-stabilized after this crate's MSRV.",
218218 #[ must_use]
219- pub const fn slice_ptr_from_raw_parts <T >( p: * mut T , len: usize ) -> * mut [ T ] {
220- varsized_pointer_from_raw_parts ( p. cast( ) , len)
219+ pub const fn slice_ptr_from_parts <T >( p: * mut T , len: usize ) -> * mut [ T ] {
220+ varsized_pointer_from_parts ( p. cast( ) , len)
221221 }
222222}
223223
@@ -553,7 +553,7 @@ impl<'a, T, A: Alloc + ?Sized> SliceAllocGuard<'a, T, A> {
553553 #[ cfg_attr( miri, track_caller) ]
554554 #[ must_use]
555555 pub const fn get_init_part( & self ) -> NonNull <[ T ] > {
556- nonnull_slice_from_raw_parts ( self . ptr, self . init)
556+ nonnull_slice_from_parts ( self . ptr, self . init)
557557 }
558558 }
559559
@@ -562,7 +562,7 @@ impl<'a, T, A: Alloc + ?Sized> SliceAllocGuard<'a, T, A> {
562562 "Gets a `NonNull<[T]>` pointer to the uninitialized elements of the slice." ,
563563 #[ must_use]
564564 pub const fn get_uninit_part( & self ) -> NonNull <[ T ] > {
565- nonnull_slice_from_raw_parts (
565+ nonnull_slice_from_parts (
566566 // SAFETY: the pointer was a valid NonNull to begin with, adding cannot invalidate
567567 // it. `self.init` will be in bounds unless an init-setting method was used
568568 // incorrectly.
@@ -578,7 +578,7 @@ impl<'a, T, A: Alloc + ?Sized> SliceAllocGuard<'a, T, A> {
578578 #[ cfg_attr( miri, track_caller) ]
579579 #[ must_use]
580580 pub const fn get_full( & self ) -> NonNull <[ T ] > {
581- nonnull_slice_from_raw_parts ( self . ptr, self . full)
581+ nonnull_slice_from_parts ( self . ptr, self . full)
582582 }
583583 }
584584
@@ -755,7 +755,7 @@ impl<T, A: Alloc + ?Sized> Drop for SliceAllocGuard<'_, T, A> {
755755 // SAFETY: `self.init` will be correct without improper usage of methods which set it. new()
756756 // requires that the pointer was allocated using the provided allocator.
757757 unsafe {
758- ptr:: drop_in_place ( slice_ptr_from_raw_parts ( self . ptr . as_ptr ( ) , self . init ) ) ;
758+ ptr:: drop_in_place ( slice_ptr_from_parts ( self . ptr . as_ptr ( ) , self . init ) ) ;
759759 self . alloc . dealloc (
760760 self . ptr . cast ( ) ,
761761 Layout :: from_size_align_unchecked ( T :: SZ * self . full , T :: ALN )
0 commit comments