diff options
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/iter.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index cafb002c01a..706f865b4d1 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -69,7 +69,8 @@ impl<T, const N: usize> IntoIter<T, N> { /// Returns an immutable slice of all elements that have not been yielded /// yet. - fn as_slice(&self) -> &[T] { + #[unstable(feature = "array_value_iter_slice", issue = "65798")] + pub fn as_slice(&self) -> &[T] { // SAFETY: We know that all elements within `alive` are properly initialized. unsafe { let slice = self.data.get_unchecked(self.alive.clone()); @@ -78,7 +79,8 @@ impl<T, const N: usize> IntoIter<T, N> { } /// Returns a mutable slice of all elements that have not been yielded yet. - fn as_mut_slice(&mut self) -> &mut [T] { + #[unstable(feature = "array_value_iter_slice", issue = "65798")] + pub fn as_mut_slice(&mut self) -> &mut [T] { // SAFETY: We know that all elements within `alive` are properly initialized. unsafe { let slice = self.data.get_unchecked_mut(self.alive.clone()); |
