about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2021-12-06 22:59:04 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2021-12-06 22:59:04 -0800
commit9b86c5998c5b5b274b21651334a320aecc516dfc (patch)
treefdd5b03df37cc7f7032f0558831986427eae4f8a /library/core/src/array
parent0b90204bc820ceafda004a5e4baf9f323b70d790 (diff)
downloadrust-9b86c5998c5b5b274b21651334a320aecc516dfc.tar.gz
rust-9b86c5998c5b5b274b21651334a320aecc516dfc.zip
s/from_raw_parts/new_unchecked/
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/iter.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs
index de3b7685385..0dc277785e8 100644
--- a/library/core/src/array/iter.rs
+++ b/library/core/src/array/iter.rs
@@ -126,7 +126,7 @@ impl<T, const N: usize> IntoIter<T, N> {
     ///             None => {
     ///                 // SAFETY: We've initialized the first `i` items
     ///                 unsafe {
-    ///                     return Err(IntoIter::from_raw_parts(buffer, 0..i));
+    ///                     return Err(IntoIter::new_unchecked(buffer, 0..i));
     ///                 }
     ///             }
     ///         }
@@ -143,7 +143,7 @@ impl<T, const N: usize> IntoIter<T, N> {
     /// ```
     #[unstable(feature = "array_into_iter_constructors", issue = "91583")]
     #[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
-    pub const unsafe fn from_raw_parts(
+    pub const unsafe fn new_unchecked(
         buffer: [MaybeUninit<T>; N],
         initialized: Range<usize>,
     ) -> Self {
@@ -210,7 +210,7 @@ impl<T, const N: usize> IntoIter<T, N> {
 
         // SAFETY: We're telling it that none of the elements are initialized,
         // which is trivially true.  And ∀N: usize, 0 <= N.
-        unsafe { Self::from_raw_parts(buffer, initialized) }
+        unsafe { Self::new_unchecked(buffer, initialized) }
     }
 
     /// Returns an immutable slice of all elements that have not been yielded