Skip to content

Commit 9b86c59

Browse files
committed
s/from_raw_parts/new_unchecked/
1 parent 0b90204 commit 9b86c59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/array/iter.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl<T, const N: usize> IntoIter<T, N> {
126126
/// None => {
127127
/// // SAFETY: We've initialized the first `i` items
128128
/// unsafe {
129-
/// return Err(IntoIter::from_raw_parts(buffer, 0..i));
129+
/// return Err(IntoIter::new_unchecked(buffer, 0..i));
130130
/// }
131131
/// }
132132
/// }
@@ -143,7 +143,7 @@ impl<T, const N: usize> IntoIter<T, N> {
143143
/// ```
144144
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
145145
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
146-
pub const unsafe fn from_raw_parts(
146+
pub const unsafe fn new_unchecked(
147147
buffer: [MaybeUninit<T>; N],
148148
initialized: Range<usize>,
149149
) -> Self {
@@ -210,7 +210,7 @@ impl<T, const N: usize> IntoIter<T, N> {
210210

211211
// SAFETY: We're telling it that none of the elements are initialized,
212212
// which is trivially true. And ∀N: usize, 0 <= N.
213-
unsafe { Self::from_raw_parts(buffer, initialized) }
213+
unsafe { Self::new_unchecked(buffer, initialized) }
214214
}
215215

216216
/// Returns an immutable slice of all elements that have not been yielded

0 commit comments

Comments
 (0)